import type { Meta, StoryObj } from '@storybook/react-vite' import { TextField } from './TextField' const meta = { title: 'Data entry/Text field', component: TextField, tags: ['autodocs'], parameters: { docs: { description: { component: 'A labeled form field with optional help text and accessible validation feedback.', }, }, }, argTypes: { error: { control: 'text', }, }, args: { label: 'Email address', hint: 'Use an address you can check today.', placeholder: 'you@example.com', }, } satisfies Meta export default meta type Story = StoryObj export const Default: Story = {} export const WithError: Story = { args: { error: 'Enter a valid email address.', defaultValue: 'not-an-email', }, }