import type { Meta, StoryObj } from '@storybook/react-vite'; import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from './dialog'; import { Button } from '../button/button'; import { Input } from '../input/input'; import { Label } from '../label/label'; const meta = { title: 'Components/Dialog', component: Dialog, parameters: { layout: 'centered', docs: { description: { component: 'Modal dialog. Traps focus, closes on Escape and returns focus to the trigger. `DialogTitle` is required — without one there is nothing for a screen reader to announce; wrap it in `sr-only` if the design has no visible heading.', }, }, }, tags: ['autodocs'], } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { render: () => ( Edit profile Changes are saved to your account immediately.
), }; /** * For a destructive confirmation, name the consequence in the button rather * than saying "OK" — the label is what people read before committing. */ export const Confirmation: Story = { render: () => ( Delete this workspace? All 42 projects and their history will be permanently removed. This cannot be undone. ), };