import type { Meta, StoryObj } from '@storybook/react'; import { Button } from './Button'; const meta: Meta = { title: 'Actions/Button', component: Button, argTypes: { variant: { control: 'select', options: ['primary', 'secondary', 'tertiary', 'danger'], }, size: { control: 'select', options: ['small', 'medium'], }, loading: { control: 'boolean', }, disabled: { control: 'boolean', }, }, }; export default meta; type Story = StoryObj; export const Primary: Story = { args: { variant: 'primary', children: 'Купить', }, }; export const Secondary: Story = { args: { variant: 'secondary', children: 'Отмена', }, }; export const Tertiary: Story = { args: { variant: 'tertiary', children: 'Подробнее', }, }; export const Danger: Story = { args: { variant: 'danger', children: 'Удалить портфель', }, }; export const Small: Story = { args: { size: 'small', children: 'Применить', }, }; export const Loading: Story = { args: { loading: true, children: 'Отправка...', }, }; export const Disabled: Story = { args: { disabled: true, children: 'Недоступно', }, }; export const AllVariants: Story = { render: () => (
), }; export const AllSizes: Story = { render: () => (
), }; export const AllStates: Story = { render: () => (
), };