From 9ae2bf79708e18044141c9b1b5953ba00a796bd1 Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Wed, 5 Jul 2023 01:18:18 +0800 Subject: [PATCH] updated --- .../ui/src/components/shadcn/ui/alert.tsx | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/packages/ui/src/components/shadcn/ui/alert.tsx b/packages/ui/src/components/shadcn/ui/alert.tsx index 43c29dd3411..f275f3bf261 100644 --- a/packages/ui/src/components/shadcn/ui/alert.tsx +++ b/packages/ui/src/components/shadcn/ui/alert.tsx @@ -3,31 +3,18 @@ import { cva, type VariantProps } from 'class-variance-authority' import { cn } from '@ui/lib/utils' - - const alertVariants = cva( - 'relative w-full rounded-lg border p-4 [&:has(svg)]:pl-14 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground' - // custom - + ' [&>svg]:w-[23px] [&>svg]:h-[23px] [&>svg]:p-1 [&>svg]:flex [&>svg]:rounded', + cn( + 'relative w-full rounded-lg border p-4 [&:has(svg)]:pl-14 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground', + '[&>svg]:w-[23px] [&>svg]:h-[23px] [&>svg]:p-1 [&>svg]:flex [&>svg]:rounded' + ), { variants: { variant: { default: - 'text-foreground' + - // removed `bg-background` - - // custom styles - ' bg-alternative [&>svg]:text-background [&>svg]:bg-foreground-strong', + 'text-foreground bg-alternative [&>svg]:text-background [&>svg]:bg-foreground-strong', destructive: - 'text-destructive' + - // removed 'border-destructive/50 dark:border-destructive [&>svg]:text-destructive' - - // custom styles - ' border-destructive-300 bg-destructive-400 [&>svg]:text-destructive-400 [&>svg]:bg-destructive', - - /** - * custom variant - */ + 'text-destructive border-destructive-300 bg-destructive-400 [&>svg]:text-destructive-400 [&>svg]:bg-destructive', warning: 'text-warning border-warning-300 bg-warning-400 [&>svg]:text-warning-400 [&>svg]:bg-warning', },