"use client" import type { Meta, StoryObj } from '@storybook/react'; import { Button } from './button'; import { Mail, Plus, Loader2 } from 'lucide-react'; const meta: Meta = { title: 'Components/Button', component: Button, parameters: { layout: 'centered', docs: { description: { component: 'Displays a button or a component that looks like a button.', }, }, }, tags: ['autodocs'], argTypes: { variant: { control: 'select', options: ['default', 'destructive', 'outline', 'secondary', 'ghost', 'link'], description: 'The visual style of the button', }, size: { control: 'select', options: ['default', 'sm', 'lg', 'icon'], description: 'The size of the button', }, disabled: { control: 'boolean', description: 'Whether the button is disabled', }, children: { control: 'text', description: 'The content of the button', }, }, }; export default meta; type Story = StoryObj; export const Default: Story = { args: { children: 'Button', }, }; export const Secondary: Story = { args: { variant: 'secondary', children: 'Secondary', }, }; export const Destructive: Story = { args: { variant: 'destructive', children: 'Destructive', }, }; export const Outline: Story = { args: { variant: 'outline', children: 'Outline', }, }; export const Ghost: Story = { args: { variant: 'ghost', children: 'Ghost', }, }; export const Link: Story = { args: { variant: 'link', children: 'Link', }, }; export const Small: Story = { args: { size: 'sm', children: 'Small', }, }; export const Large: Story = { args: { size: 'lg', children: 'Large', }, }; export const Icon: Story = { args: { size: 'icon', children: , }, }; export const WithIcon: Story = { args: { children: ( <> Login with Email ), }, }; export const Loading: Story = { args: { disabled: true, children: ( <> Please wait ), }, }; export const Disabled: Story = { args: { disabled: true, children: 'Disabled', }, }; export const AllVariants: Story = { render: () => (
), parameters: { docs: { description: { story: 'All button variants and sizes in one view.', }, }, }, };