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. Hovering or focusing a toast pauses its timer.\n\nEach kind selects a colour palette — `success` → green, `error` → red, `warning` → yellow, `info` → secondary, and a plain toast → the neutral palette. The fill, the accent down the leading edge and the icon all read from that one choice, so a toast matches the rest of the UI in both themes.',
},
},
},
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) => (
<>
>
),
};