@@ -16,20 +16,6 @@ interface ClosableAlertProps {
1616 onClose ?: ( id : string ) => void ;
1717}
1818
19- const variantStyles = {
20- warning : "border-l-orange-500 bg-orange-50 dark:bg-orange-950/20 border border-orange-200 dark:border-orange-800" ,
21- error : "border-l-red-500 bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800" ,
22- success : "border-l-green-500 bg-green-50 dark:bg-green-950/20 border border-green-200 dark:border-green-800" ,
23- info : "border-l-blue-500 bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800" ,
24- } ;
25-
26- const iconStyles = {
27- warning : "text-orange-500" ,
28- error : "text-red-500" ,
29- success : "text-green-500" ,
30- info : "text-blue-500" ,
31- } ;
32-
3319export function ClosableAlert ( {
3420 id,
3521 title,
@@ -50,18 +36,24 @@ export function ClosableAlert({
5036
5137 if ( ! isVisible ) return null ;
5238
39+ // Only use color for critical errors
40+ const isError = variant === "error" ;
41+
5342 return (
5443 < div
5544 className = { cn (
56- "rounded border-l-4 transition-all duration-200" ,
57- variantStyles [ variant ] ,
45+ "rounded border bg-muted/50 transition-all duration-200" ,
46+ isError && "border-destructive/20 bg-destructive/5" ,
5847 className
5948 ) }
6049 >
6150 { /* Header - always visible */ }
6251 < div className = "flex items-center justify-between p-3" >
6352 < div className = "flex items-center gap-2 flex-1 min-w-0" >
64- < Icon className = { cn ( "h-4 w-4 flex-shrink-0" , iconStyles [ variant ] ) } />
53+ < Icon className = { cn (
54+ "h-4 w-4 flex-shrink-0" ,
55+ isError ? "text-destructive" : "text-muted-foreground"
56+ ) } />
6557 < div className = "flex-1 min-w-0" >
6658 < h4 className = "text-sm font-medium" > { title } </ h4 >
6759 { ! isExpanded && (
@@ -77,30 +69,30 @@ export function ClosableAlert({
7769 < Button
7870 variant = "ghost"
7971 size = "sm"
80- className = "h-6 w-6 p-0 hover:bg-black/5 dark:hover:bg-white/5 rounded"
72+ className = "h-6 w-6 p-0 rounded"
8173 onClick = { ( ) => setIsExpanded ( ! isExpanded ) }
8274 >
8375 { isExpanded ? (
84- < ChevronUp className = "h-3 w-3 text-muted-foreground " />
76+ < ChevronUp className = "h-3 w-3" />
8577 ) : (
86- < ChevronDown className = "h-3 w-3 text-muted-foreground " />
78+ < ChevronDown className = "h-3 w-3" />
8779 ) }
8880 </ Button >
8981 ) }
9082 < Button
9183 variant = "ghost"
9284 size = "sm"
93- className = "h-6 w-6 p-0 hover:bg-black/5 dark:hover:bg-white/5 rounded"
85+ className = "h-6 w-6 p-0 rounded"
9486 onClick = { handleClose }
9587 >
96- < X className = "h-3 w-3 text-muted-foreground hover:text-foreground " />
88+ < X className = "h-3 w-3" />
9789 </ Button >
9890 </ div >
9991 </ div >
10092
10193 { /* Expandable content */ }
10294 { isExpanded && (
103- < div className = "px-3 pb-3 border-t border-black/5 dark: border-white/5 " >
95+ < div className = "px-3 pb-3 border-t border-border/50 " >
10496 < div className = "pt-3 space-y-2" >
10597 < p className = "text-xs text-muted-foreground leading-relaxed" >
10698 { description }
0 commit comments