import SimpleRadio from '@/components/SimpleRadio'; import { Meta, StoryObj } from '@storybook/react'; const meta: Meta = { title: 'SimpleRadioGroup', component: SimpleRadio, tags: ['autodocs'], }; export default meta; type Story = StoryObj; export const Default: Story = { args: { name: 'tax-class-selection', options: [ { label: 'Standard Rate', value: 'standard' }, { label: 'Reduced Rate', value: 'reduced' }, { label: 'Zero Rate', value: 'zero' }, ], }, }; export const WithLabel: Story = { args: { label: 'Assign another tax class', helpText: 'You should assign another class before deleting a class.', name: 'tax-class-selection', options: [ { label: 'Standard Rate', value: 'standard' }, { label: 'Reduced Rate', value: 'reduced' }, { label: 'Zero Rate', value: 'zero' }, ], }, }; export const WithLabelAndSelectedBackground: Story = { args: { label: 'Assign another tax class', helpText: 'You should assign another class before deleting a class.', name: 'tax-class-selection', options: [ { label: 'Standard Rate', value: 'standard' }, { label: 'Reduced Rate', value: 'reduced' }, { label: 'Zero Rate', value: 'zero' }, ], selectedOptionClass: 'bg-blue-100', }, }; export const WithLabelAndDefault: Story = { args: { label: 'Assign another tax class', helpText: 'You should assign another class before deleting a class.', name: 'tax-class-selection', options: [ { label: 'Standard Rate', value: 'standard' }, { label: 'Reduced Rate', value: 'reduced' }, { label: 'Zero Rate', value: 'zero' }, ], defaultValue: 'zero', }, }; export const WithLabelAndValue: Story = { args: { label: 'Assign another tax class', helpText: 'You should assign another class before deleting a class.', name: 'tax-class-selection', options: [ { label: 'Standard Rate', value: 'standard' }, { label: 'Reduced Rate', value: 'reduced' }, { label: 'Zero Rate', value: 'zero' }, ], value: 'reduced', }, }; export const WithLabelAndError: Story = { args: { label: 'Assign another tax class', helpText: 'You should assign another class before deleting a class.', name: 'tax-class-selection', options: [ { label: 'Standard Rate', value: 'standard' }, { label: 'Reduced Rate', value: 'reduced' }, { label: 'Zero Rate', value: 'zero' }, ], errors: ['You must choose one from the above list.'], }, };