import type { Meta, StoryObj } from '@storybook/react'; import { fn } from '@storybook/test'; import { Checkbox } from './Checkbox'; const meta: Meta = { title: 'Inputs/Checkbox', component: Checkbox, argTypes: { label: { control: 'text' }, checked: { control: 'boolean' }, disabled: { control: 'boolean' }, error: { control: 'boolean' }, }, }; export default meta; type Story = StoryObj; export const Unchecked: Story = { args: { label: 'Согласен с условиями', checked: false, onChange: fn(), }, }; export const Checked: Story = { args: { label: 'Согласен с условиями', checked: true, onChange: fn(), }, }; export const Disabled: Story = { args: { label: 'Недоступно', checked: false, onChange: fn(), disabled: true, }, }; export const Error: Story = { args: { label: 'Согласен с условиями', checked: false, onChange: fn(), error: true, }, };