import { cn } from "@/lib/utils"; import clsx from "clsx"; import { PropsWithChildren } from "react"; import { Info, AlertTriangle, ShieldAlert, CheckCircle, } from "lucide-react"; type NoteProps = PropsWithChildren & { title?: string; type?: "note" | "danger" | "warning" | "success"; }; const iconMap = { note: , danger: , warning: , success: , }; export default function Note({ children, title = "Note", type = "note", }: NoteProps) { const noteClassNames = clsx({ "dark:bg-stone-950/25 bg-stone-50": type === "note", "dark:bg-red-950 bg-red-100 border-red-200 dark:border-red-900": type === "danger", "bg-orange-50 border-orange-200 dark:border-orange-900 dark:bg-orange-900/50": type === "warning", "dark:bg-green-950 bg-green-100 border-green-200 dark:border-green-900": type === "success", }); return (
{iconMap[type]} {title}:
{children}
); }