import type { Meta, StoryObj } from '@storybook/nextjs-vite'; import { AlertTriangleIcon } from '../components/icons-v2-generated/interface/alert-triangle-icon'; import { Alert, AlertDescription, AlertTitle } from '../components/ui/alert'; const meta = { title: 'UI/Alert', component: Alert, argTypes: { variant: { control: 'select', options: ['default', 'destructive', 'warning'], }, }, } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { args: { variant: 'default' }, render: args => ( Heads up! You can add components to your app using the CLI. ), }; export const Destructive: Story = { args: { variant: 'destructive' }, render: args => ( Error Your session has expired. Please log in again. ), }; export const Warning: Story = { args: { variant: 'warning' }, render: args => ( Warning Some of your settings need attention. ), }; /** * Real-world usage: the Settings page email-verification banner. * Mirrors the Figma design — warning variant, alert-triangle icon, message and a resend action. */ export const EmailVerification: Story = { args: { variant: 'warning' }, render: args => (

Verify your email to keep access to system.

), }; export const AllVariants: Story = { args: { variant: 'default' }, render: () => (
Default Neutral informational alert. Destructive Something went wrong. Warning Proceed with caution.
), };