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

53 lines
919 B
TypeScript

import type { Meta, StoryObj } from '@storybook/react';
import { Money } from './Money';
const meta: Meta<typeof Money> = {
title: 'Data/Money',
component: Money,
argTypes: {
value: { control: 'number' },
currency: { control: 'text' },
locale: { control: 'text' },
signDisplay: {
control: 'select',
options: ['auto', 'always', 'never'],
},
},
};
export default meta;
type Story = StoryObj<typeof Money>;
export const Rubles: Story = {
args: {
value: 1234.56,
currency: 'RUB',
locale: 'ru-RU',
},
};
export const Dollars: Story = {
args: {
value: 1234.56,
currency: 'USD',
locale: 'en-US',
},
};
export const Negative: Story = {
args: {
value: -500,
currency: 'RUB',
locale: 'ru-RU',
},
};
export const WithSign: Story = {
args: {
value: 500,
currency: 'RUB',
locale: 'ru-RU',
signDisplay: 'always',
},
};