Sergey Krylov 53659a36b1 feat(design-system): add data components, form/page-state patterns, and frontend integration
- 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)
2026-06-21 09:49:18 +03:00

52 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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,
},
};