import * as React from "react"; import { InfoIcon, TriangleAlertIcon } from "lucide-react"; import { cn } from "../lib/utils"; type InfoVariant = "default" | "warning"; const variantClassName: Record< InfoVariant, { readonly root: string; readonly icon: string; } > = { default: { root: "border-border/70 bg-card/50 text-foreground", icon: "text-muted-foreground", }, warning: { root: "border-border/70 border-l-amber-500 bg-card text-foreground shadow-xs dark:border-border/70 dark:border-l-amber-400 dark:bg-card/70", icon: "text-amber-600 dark:text-amber-400", }, }; function Info({ className, variant = "default", children, ...props }: React.ComponentProps<"section"> & { readonly variant?: InfoVariant; }) { const Icon = variant === "warning" ? TriangleAlertIcon : InfoIcon; const variantClass = variantClassName[variant]; return (
{children}
); } function InfoTitle({ className, ...props }: React.ComponentProps<"div">) { return (
); } function InfoDescription({ className, ...props }: React.ComponentProps<"div">) { return (
); } export { Info, InfoTitle, InfoDescription };