fix: Improve destructive Alert variant styling

Update the destructive variant to use proper danger colors (light red background with dark red text in light mode, dark red background with light text in dark mode) instead of the previous white background with red text.

This allows semantic use of variant="destructive" throughout the app without custom styling overrides.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Jan-Henrik Bruhn 2025-12-22 12:00:54 +01:00
parent 4593b66356
commit 5aa4e15922
2 changed files with 3 additions and 6 deletions

View file

@ -386,11 +386,8 @@ export function FileUpload() {
)} )}
{pesData && boundsCheck.error && ( {pesData && boundsCheck.error && (
<Alert <Alert variant="destructive">
variant="destructive" <AlertDescription>
className="bg-danger-100 dark:bg-danger-900/20 border-danger-200 dark:border-danger-800"
>
<AlertDescription className="text-danger-900 dark:text-danger-100 text-sm">
<strong>Pattern too large:</strong> {boundsCheck.error} <strong>Pattern too large:</strong> {boundsCheck.error}
</AlertDescription> </AlertDescription>
</Alert> </Alert>

View file

@ -10,7 +10,7 @@ const alertVariants = cva(
variant: { variant: {
default: "bg-card text-card-foreground", default: "bg-card text-card-foreground",
destructive: destructive:
"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90", "bg-danger-100 dark:bg-danger-900/20 border-danger-200 dark:border-danger-800 text-danger-900 dark:text-danger-100 [&>svg]:text-current *:data-[slot=alert-description]:text-danger-900 dark:*:data-[slot=alert-description]:text-danger-100",
}, },
}, },
defaultVariants: { defaultVariants: {