This commit is contained in:
Jonathan Summers-Muir committed 2023-07-05 01:18:18 +08:00
1 parent 8c4a9429d3
commit 9ae2bf7970
1 file changed
+6 -19
+6 -19
View File
@@ -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',
},