Skip to content

Commit 09bbb7c

Browse files
authored
fix(design-system): keep Alert variant text foreground explicit (supabase#46050)
## What kind of change does this PR introduce? Bug fix. Follow-up to DEPR-551, supabase#45302, supabase#45535, supabase#45618, and stacked on supabase#46049. ## What is the current behaviour? Warning and destructive Alert variants do not explicitly own their foreground text colour. In muted parent contexts, nested Admonition content can inherit lighter text styling. ## What is the new behaviour? Warning and destructive Alert variants now include `text-foreground`, just like the default counterpart. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Updated styling for alert components with destructive and warning variants. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46050?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 4c148ea commit 09bbb7c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/ui/src/components/shadcn/ui

packages/ui/src/components/shadcn/ui/alert.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export const alertVariants = cva(
1616
default:
1717
'bg-surface-200/25 border-default text-foreground [&>svg]:text-background [&>svg]:bg-foreground',
1818
destructive:
19-
'bg-destructive-200 border-destructive-400 [&>svg]:text-destructive-200 [&>svg]:bg-destructive-600',
19+
'bg-destructive-200 border-destructive-400 text-foreground [&>svg]:text-destructive-200 [&>svg]:bg-destructive-600',
2020
warning:
21-
'bg-warning-200 border-warning-400 [&>svg]:text-warning-200 [&>svg]:bg-warning-600',
21+
'bg-warning-200 border-warning-400 text-foreground [&>svg]:text-warning-200 [&>svg]:bg-warning-600',
2222
},
2323
},
2424
defaultVariants: {

0 commit comments

Comments
 (0)