/** * @file ToastNotice.tsx * @description Bottom-right success/error toast for the config explorer. * Tool-agnostic — the page owns the 5s auto-dismiss timer and passes the * message down. * @author Nguyễn Ngọc Trí Vĩ */ import { AlertCircle, Check, X } from "lucide-react"; export type Toast = { kind: "success" | "error"; message: string } | null; export function ToastNotice({ toast, onDismiss, }: { toast: NonNullable; onDismiss: () => void; }) { const isErr = toast.kind === "error"; return (
{isErr ? ( ) : ( )} {toast.message}
); }