import type { Meta, StoryObj } from '@storybook/react'; import { Button } from 'avanza-ui'; // Icon components for examples const MicIcon = () => ( ); const VideoIcon = () => ( ); const PlusIcon = () => ( ); const meta = { title: 'Components/Button', component: Button, parameters: { layout: 'centered', }, tags: ['autodocs'], argTypes: { variant: { control: 'select', options: ['primary', 'secondary', 'danger', 'success', 'ghost'], }, size: { control: 'select', options: ['sm', 'md', 'lg'], }, loading: { control: 'boolean', }, disabled: { control: 'boolean', }, fullWidth: { control: 'boolean', }, iconOnly: { control: 'boolean', }, }, } satisfies Meta; export default meta; type Story = StoryObj; // ===== VARIANTES ===== export const Primary: Story = { args: { variant: 'primary', children: 'Primary Button', }, }; export const Secondary: Story = { args: { variant: 'secondary', children: 'Secondary Button', }, }; export const Danger: Story = { args: { variant: 'danger', children: 'Danger Button', }, }; export const Success: Story = { args: { variant: 'success', children: 'Success Button', }, }; export const Ghost: Story = { args: { variant: 'ghost', children: 'Ghost Button', }, }; // ===== TAMAÑOS ===== export const Small: Story = { args: { size: 'sm', children: 'Small Button', }, }; export const Medium: Story = { args: { size: 'md', children: 'Medium Button', }, }; export const Large: Story = { args: { size: 'lg', children: 'Large Button', }, }; // ===== CON ÍCONOS ===== export const WithLeftIcon: Story = { args: { variant: 'primary', leftIcon: , children: 'With Left Icon', }, }; export const WithRightIcon: Story = { args: { variant: 'secondary', rightIcon: , children: 'With Right Icon', }, }; export const IconOnly: Story = { args: { variant: 'secondary', iconOnly: true, children: , }, }; // ===== ESTADOS ===== export const Loading: Story = { args: { variant: 'primary', loading: true, children: 'Loading...', }, }; export const Disabled: Story = { args: { variant: 'primary', disabled: true, children: 'Disabled', }, }; export const FullWidth: Story = { args: { variant: 'primary', fullWidth: true, children: 'Full Width Button', }, parameters: { layout: 'padded', }, }; // ===== COMBINACIONES (ESTILO STREAMYARD) ===== export const MicrophoneButton: Story = { name: 'Microphone (StreamYard Style)', args: { variant: 'secondary', iconOnly: true, size: 'lg', children: , }, }; export const CameraButton: Story = { name: 'Camera (StreamYard Style)', args: { variant: 'secondary', iconOnly: true, size: 'lg', children: , }, }; export const AddGuestButton: Story = { name: 'Add Guest (StreamYard Style)', args: { variant: 'secondary', leftIcon: , children: 'Agregar invitados', }, }; export const StartRecording: Story = { name: 'Start Recording (StreamYard Style)', args: { variant: 'danger', children: 'Grabar', }, }; export const LeaveStudio: Story = { name: 'Leave Studio (StreamYard Style)', args: { variant: 'danger', children: 'Salir del estudio', }, }; // ===== PLAYGROUND ===== export const Playground: Story = { args: { variant: 'primary', size: 'md', children: 'Playground', }, }; // ===== GRUPOS ===== export const AllVariants: Story = { name: 'All Variants', render: () => (
), }; export const AllSizes: Story = { name: 'All Sizes', render: () => (
), }; export const StreamYardControlBar: Story = { name: 'StreamYard-style Control Bar', render: () => (
), parameters: { layout: 'centered', }, };