import type { Meta, StoryObj } from '@storybook/react-vite'; import { Toaster, toast } from './toast'; import { Button } from '../button/button'; const meta = { title: 'Components/Toast', component: Toaster, parameters: { layout: 'centered', docs: { description: { component: 'Toast host. Mount `` once near the root of the app, then call `toast()` from anywhere. Colours come from the kit tokens, so toasts match the rest of the UI in both themes. Hovering or focusing a toast pauses its timer.', }, }, }, tags: ['autodocs'], } satisfies Meta; export default meta; type Story = StoryObj; export const Kinds: Story = { render: (args) => ( <>
), }; /** An undo action turns a destructive change into a recoverable one. */ export const WithAction: Story = { render: (args) => ( <> ), }; /** Named `PromiseToast` rather than `Promise` so it does not shadow the global. */ export const PromiseToast: Story = { render: (args) => ( <> ), };