- Inputs: TextField, Select, Checkbox - Surfaces: Surface, Card, Chip, Badge - Feedback: Alert, Dialog, Skeleton, Progress - Financial data: DataTable, Metric, Money, PriceChange - Form & page-state: FormField, FilterBar, EmptyState, ErrorState, LoadingState - MUI CssVarsProvider -> ThemeProvider deprecation fix - Inter font bundled via @fontsource/inter - ESLint no-restricted-imports (warn) for gradual migration - storybook-static gitignored All 268 tests pass (157 design-system + 111 frontend)
52 lines
1.0 KiB
TypeScript
52 lines
1.0 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/react';
|
||
import { fn } from '@storybook/test';
|
||
import { Checkbox } from './Checkbox';
|
||
|
||
const meta: Meta<typeof Checkbox> = {
|
||
title: 'Inputs/Checkbox',
|
||
component: Checkbox,
|
||
argTypes: {
|
||
label: { control: 'text' },
|
||
checked: { control: 'boolean' },
|
||
disabled: { control: 'boolean' },
|
||
error: { control: 'boolean' },
|
||
},
|
||
};
|
||
|
||
export default meta;
|
||
type Story = StoryObj<typeof Checkbox>;
|
||
|
||
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,
|
||
},
|
||
};
|