import type { Meta, StoryObj } from '@storybook/react-vite'; import { CircleCheckIcon, InfoIcon, OctagonXIcon, TriangleAlertIcon } from 'lucide-react'; import { Alert, AlertDescription, AlertTitle } from './alert'; const meta = { title: 'Components/Alert', component: Alert, parameters: { layout: 'centered', docs: { description: { component: 'Inline message about the state of the page. It carries `role="alert"`, so screen readers announce it the moment it appears — do not use it for static explanatory copy.', }, }, }, tags: ['autodocs'], argTypes: { variant: { control: 'select', options: ['default', 'destructive', 'success', 'warning'] }, }, decorators: [(Story) =>
], } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { render: () => ( Scheduled maintenance The API will be read-only on Sunday from 02:00 UTC. ), }; export const Variants: Story = { render: () => (
Heads up You can revert this change for 30 days. Deployment finished Version 2.4.0 is live in production. Approaching your quota You have used 92% of this month's credits. Payment failed Update your card to avoid losing access.
), }; export const TitleOnly: Story = { render: () => ( Your changes have been saved. ), };