'use client' import * as React from 'react' import { cn } from '../../lib/utils' import { useToast, type ToastVariant } from './use-toast' const variantClasses: Record = { default: 'bg-background border-border text-foreground', destructive: 'bg-destructive border-destructive text-destructive-foreground', success: 'bg-green-50 border-green-200 text-green-900', warning: 'bg-yellow-50 border-yellow-200 text-yellow-900', info: 'bg-blue-50 border-blue-200 text-blue-900', } export function Toaster() { const { toasts, dismiss } = useToast() if (toasts.length === 0) return null return (
{toasts.map((t) => (
{t.title && (
{t.title}
)} {t.description && (
{t.description}
)}
{t.action &&
{t.action}
}
))}
) }