import type { Meta, StoryObj } from '@storybook/react' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' const meta = { title: 'Primitives/Input', component: Input, tags: ['autodocs'], parameters: { layout: 'centered' }, argTypes: { type: { control: 'select', options: ['text', 'email', 'password', 'number', 'search', 'tel', 'url', 'file'], }, disabled: { control: 'boolean' }, placeholder: { control: 'text' }, }, } satisfies Meta export default meta type Story = StoryObj export const Default: Story = { args: { placeholder: 'Enter text...', type: 'text', }, } export const Email: Story = { args: { type: 'email', placeholder: 'email@example.com', }, } export const Password: Story = { args: { type: 'password', placeholder: 'Enter password...', }, } export const File: Story = { args: { type: 'file', }, } export const Disabled: Story = { args: { placeholder: 'Disabled input', disabled: true, }, } export const WithLabel: Story = { render: () => (
), } export const ErrorState: Story = { render: () => (

Please enter a valid email address.

), } export const WithDefaultValue: Story = { args: { type: 'text', defaultValue: 'Hello world', }, }