import type { Meta, StoryObj } from '@storybook/react-vite' import { useState } from 'react' import { IconArrowLeft } from '@tabler/icons-react' import { Button } from './Button' import { Chip } from './Chip' import { DialogShell } from './DialogShell' import { IconButton } from './IconButton' import { Field } from './Field' import { Form } from './Form' import { TextInput } from './TextInput' import { Textarea } from './Textarea' const meta = { title: 'Overlays/DialogShell', component: DialogShell, parameters: { layout: 'fullscreen', // Portals a fixed overlay to document.body — render in an iframe on the // Docs page so it doesn't escape over the docs content. docs: { story: { inline: false, height: '600px' } }, }, argTypes: { children: { control: false }, footer: { control: false } }, args: { title: 'Dialog title', onClose: () => {} }, } satisfies Meta export default meta type Story = StoryObj /** * The reusable dialog scaffold. A new dialog is just the header title, a body * (fields wrapped in `Field`), and a footer of buttons — the portal, backdrop, * card, and chrome all come from `DialogShell`. */ export const Default: Story = { args: { footer: ( <> ), // In a Form, as a dialog's fields always are: it places them 24px apart. children: (
{}} aria-label="Example">