import RadioGroup, { RadioGroupProps } from '@/components/RadioGroup'; import { useArgs } from '@storybook/preview-api'; import { Meta, StoryObj } from '@storybook/react'; import { useState } from 'react'; import { FiBox, FiTruck } from 'react-icons/fi'; const meta: Meta = { title: 'RadioGroup', component: RadioGroup, tags: ['autodocs'], }; export default meta; type Story = StoryObj; export const Default: Story = { args: { allowDeselect: true, className: 'w-80', options: [ { label: 'Custom Shipping', value: 'custom', description: 'Manually calculate the shipping rates and ship depending on your needs.', icon: , }, { label: 'Carrier Based Shipping', value: 'carrier', description: 'Send your delivery through third-part delivery provider.', icon: , }, ], }, render: () => { const [args] = useArgs(); const [selected, setSelected] = useState(''); return ( <> setSelected(selectedValue)} />

Current Value: {selected}

); }, };