import * as React from "react" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const alertVariants = cva( "relative w-full rounded-xl border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 gap-y-1 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current [&>svg]:shrink-0", { variants: { variant: { default: "border-border bg-card text-card-foreground", destructive: "border-destructive/40 bg-destructive/10 text-destructive", warning: "border-amber-500/40 bg-amber-500/10 text-amber-700 dark:text-amber-400", info: "border-sky-500/40 bg-sky-500/10 text-sky-700 dark:text-sky-400", success: "border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400", }, }, defaultVariants: { variant: "default", }, } ) function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps) { return (
) } function AlertTitle({ className, ...props }: React.ComponentProps<"div">) { return (
) } function AlertDescription({ className, ...props }: React.ComponentProps<"div">) { return (
) } function AlertAction({ className, ...props }: React.ComponentProps<"div">) { return (
) } export { Alert, AlertTitle, AlertDescription, AlertAction, alertVariants }