import type { Meta, StoryObj } from '@storybook/react-vite'; import { Label } from './label'; import { Input } from '../input/input'; import { Checkbox } from '../checkbox/checkbox'; const meta = { title: 'Components/Label', component: Label, parameters: { layout: 'centered', docs: { description: { component: 'Form label. Always point `htmlFor` at the control\'s `id` — that is what makes the label clickable and what screen readers use to name the field.', }, }, }, tags: ['autodocs'], args: { children: 'Email address' }, } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = {}; export const WithInput: Story = { render: (args) => (
), }; /** * The `peer` class on a sibling control lets the label dim itself when that * control is disabled, with no extra state to track. */ export const DimsWithDisabledControl: Story = { render: () => (
), };