import { View } from 'react-native'; import type { Meta, StoryObj } from '@storybook/react'; import { Button } from './Button'; import type { ButtonVariant } from './Button.types'; const meta = { title: 'Atoms/Button', component: Button, parameters: { layout: 'centered' }, argTypes: { variant: { control: { type: 'select' }, options: ['primary', 'secondary', 'outline', 'ghost', 'danger', 'success', 'link'], }, size: { control: { type: 'select' }, options: ['sm', 'md', 'lg'] }, disabled: { control: 'boolean' }, loading: { control: 'boolean' }, fullWidth: { control: 'boolean' }, }, args: { children: 'Aceptar', variant: 'primary', size: 'md', }, } satisfies Meta; export default meta; type Story = StoryObj; export const Primary: Story = {}; export const Secondary: Story = { args: { variant: 'secondary' } }; export const Danger: Story = { args: { variant: 'danger', children: 'Eliminar' } }; export const Loading: Story = { args: { loading: true } }; export const Disabled: Story = { args: { disabled: true } }; const variants: ButtonVariant[] = [ 'primary', 'secondary', 'outline', 'ghost', 'danger', 'success', 'link', ]; export const AllVariants: Story = { render: () => ( {variants.map((variant) => ( ))} ), };