import type { Meta, StoryObj } from '@storybook/react'; import { Button } from '../Button/Button'; import { Alert } from './Alert'; const meta: Meta = { title: 'Feedback/Alert', component: Alert, argTypes: { severity: { control: 'select', options: ['info', 'success', 'warning', 'error'], }, title: { control: 'text' }, }, }; export default meta; type Story = StoryObj; 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: ( ), }, }; export const WithoutTitle: Story = { args: { severity: 'info', children: 'Просто информационное сообщение без заголовка', }, };