"use client"; import { AlertCircle, CheckCircle2, Info, X } from "lucide-react"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; export type InlineAlertType = "error" | "success" | "warning" | "info"; export interface InlineAlertProps { type: InlineAlertType; message: string; title?: string; onDismiss?: () => void; className?: string; } const tone: Record = { error: "border-danger-border bg-danger-bg text-danger", success: "border-success-border bg-success-bg text-success", warning: "border-warning-border bg-warning-bg text-warning", info: "border-border bg-muted/60 text-foreground", }; const icons: Record = { error: AlertCircle, success: CheckCircle2, warning: AlertCircle, info: Info, }; export function InlineAlert({ type, message, title, onDismiss, className }: InlineAlertProps) { const Icon = icons[type]; return (
{title &&

{title}

}

{message}

{onDismiss && ( )}
); }