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

70 lines
1.6 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 { Button } from '../Button/Button';
import { Alert } from './Alert';
const meta: Meta<typeof Alert> = {
title: 'Feedback/Alert',
component: Alert,
argTypes: {
severity: {
control: 'select',
options: ['info', 'success', 'warning', 'error'],
},
title: { control: 'text' },
},
};
export default meta;
type Story = StoryObj<typeof Alert>;
export const Info: Story = {
args: {
severity: 'info',
title: 'Информация',
children: 'Данные обновляются каждые 15 минут',
},
};
export const Success: Story = {
args: {
severity: 'success',
title: 'Успешно',
children: 'Портфель успешно создан',
},
};
export const Warning: Story = {
args: {
severity: 'warning',
title: 'Внимание',
children: 'Цена акции превысила лимит',
},
};
export const Error: Story = {
args: {
severity: 'error',
title: 'Ошибка',
children: 'Не удалось загрузить данные',
},
};
export const WithAction: Story = {
args: {
severity: 'warning',
children: 'Обновите страницу для получения актуальных данных',
action: (
<Button size="small" variant="secondary">
Обновить
</Button>
),
},
};
export const WithoutTitle: Story = {
args: {
severity: 'info',
children: 'Просто информационное сообщение без заголовка',
},
};