11import * as React from "react" ;
22import { cva , type VariantProps } from "class-variance-authority" ;
3- import { AlertCircleIcon , CheckCircleIcon , InfoIcon , XCircleIcon } from "lucide-react" ;
3+ import {
4+ AlertCircleIcon ,
5+ AlertTriangleIcon ,
6+ CheckCircleIcon ,
7+ InfoIcon ,
8+ MessageCircleIcon ,
9+ XCircleIcon ,
10+ } from "lucide-react" ;
411import { cn } from "../lib/utils" ;
512
613const alertVariants = cva (
@@ -12,8 +19,11 @@ const alertVariants = cva(
1219 "astw:bg-primary/10 astw:text-primary astw:border-primary/20 *:data-[slot=alert-description]:astw:text-primary/80" ,
1320 success :
1421 "astw:bg-green-500/10 astw:text-green-700 astw:border-green-500/20 dark:astw:text-green-400 *:data-[slot=alert-description]:astw:text-green-700/80 dark:*:data-[slot=alert-description]:astw:text-green-400/80" ,
22+ warning :
23+ "astw:bg-yellow-500/10 astw:text-yellow-700 astw:border-yellow-500/20 dark:astw:text-yellow-500 *:data-[slot=alert-description]:astw:text-yellow-700/80 dark:*:data-[slot=alert-description]:astw:text-yellow-500/80" ,
1524 error :
1625 "astw:bg-destructive/10 astw:text-destructive astw:border-destructive/20 *:data-[slot=alert-description]:astw:text-destructive/80" ,
26+ info : "astw:bg-blue-500/10 astw:text-blue-700 astw:border-blue-500/20 dark:astw:text-blue-400 *:data-[slot=alert-description]:astw:text-blue-700/80 dark:*:data-[slot=alert-description]:astw:text-blue-400/80" ,
1727 neutral :
1828 "astw:bg-secondary astw:text-secondary-foreground astw:border-border *:data-[slot=alert-description]:astw:text-muted-foreground" ,
1929 } ,
@@ -30,8 +40,10 @@ const variantIcons: Record<
3040> = {
3141 default : AlertCircleIcon ,
3242 success : CheckCircleIcon ,
43+ warning : AlertTriangleIcon ,
3344 error : XCircleIcon ,
34- neutral : InfoIcon ,
45+ info : InfoIcon ,
46+ neutral : MessageCircleIcon ,
3547} ;
3648
3749type RootProps = React . ComponentProps < "div" > & VariantProps < typeof alertVariants > ;
0 commit comments