import { cva, VariantProps } from 'class-variance-authority'; import React from 'react'; import { cn } from '@/lib/classMerge'; import { Text } from '../typography'; import { Xmark } from '../icons'; const statusVariants = cva('shadow p-3 rounded', { variants: { variant: { danger: 'bg-danger-foreground text-white', default: 'bg-background text-foreground border' } }, defaultVariants: { variant: 'default' } }); export const StatusCard: React.FC< { message: string; title?: string; className?: string; onClose?: () => void; extra?: React.ReactNode; } & VariantProps > = ({ message, title, variant = 'default', className, onClose, extra }) => { return (
{title && {title}} {message} {extra && extra} {onClose && (
)}
); };