import type { Meta, StoryObj } from '@storybook/react'; import { Input } from '../fields'; import { Fieldset, type FieldsetProps } from './fieldset'; const meta = { component: Fieldset, title: 'Atoms/Forms/Fieldset', } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { args: {}, }; const FieldsetWithFields = ({ inputLabel, ...props }: FieldsetProps & { inputLabel: string }) => (
); type WithFieldStory = StoryObj; export const Enabled: WithFieldStory = { name: 'State: Enabled', args: { ...Default.args, inputLabel: 'Example of a field inside an enabled fieldset', isDisabled: false, }, render: FieldsetWithFields, }; export const Disabled: WithFieldStory = { name: 'State: Disabled', args: { ...Default.args, inputLabel: 'Example of a field inside a disabled fieldset', isDisabled: true, }, render: FieldsetWithFields, };