import type { Meta, StoryObj } from '@storybook/react-vite'; import { Input } from './input'; import { Label } from '../label/label'; const meta = { title: 'Components/Input', component: Input, parameters: { layout: 'centered', docs: { description: { component: 'Single-line text field. The error treatment is driven by `aria-invalid`, so what is shown always matches what assistive technology reports.', }, }, }, tags: ['autodocs'], args: { placeholder: 'name@example.com' }, decorators: [(Story) =>
], } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = {}; export const WithLabel: Story = { render: (args) => (
), }; export const Types: Story = { render: () => (
), }; export const Invalid: Story = { args: { 'aria-invalid': true, defaultValue: 'not-an-email' }, }; export const Disabled: Story = { args: { disabled: true, defaultValue: 'Read only' }, };