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

24 lines
463 B
TypeScript

import type { ReactNode } from 'react';
export interface MoneyProps {
value: number;
currency?: string;
locale?: string;
signDisplay?: 'auto' | 'always' | 'never';
}
export function Money({
value,
currency = 'RUB',
locale = 'ru-RU',
signDisplay = 'auto',
}: MoneyProps) {
const formatted = new Intl.NumberFormat(locale, {
style: 'currency',
currency,
signDisplay,
}).format(value);
return formatted as unknown as ReactNode;
}