import type { HTMLAttributes } from "react";
import { cn } from "@/lib/utils";
export type AlertVariant = "neutral" | "success" | "warning" | "destructive";
export interface AlertProps extends HTMLAttributes {
/** Color of the accent stripe and icon. Default "neutral". */
variant?: AlertVariant;
}
const ACCENT_CLASS: Record = {
neutral: "border-l-border-strong [&_svg]:text-muted-foreground",
success: "border-l-success [&_svg]:text-success",
warning: "border-l-warning [&_svg]:text-warning",
destructive: "border-l-destructive [&_svg]:text-destructive",
};
/** A banner with a colored accent stripe. Body text stays neutral so contrast never depends on the variant. */
export function Alert({ variant = "neutral", className, ...props }: AlertProps) {
return (
);
}
export function AlertTitle({ className, ...props }: HTMLAttributes) {
return (
);
}
export function AlertDescription({ className, ...props }: HTMLAttributes) {
return (
);
}