@@ -21,11 +21,14 @@ interface SheetOverlayProps extends React.ComponentPropsWithoutRef<typeof SheetP
21
21
22
22
const SheetOverlay = React . forwardRef < React . ElementRef < typeof SheetPrimitive . Overlay > , SheetOverlayProps > (
23
23
( { className, modal, handleClose, ...props } , ref ) => {
24
+ const { isLightTheme } = useTheme ( )
25
+
24
26
if ( modal ) {
25
27
return (
26
28
< SheetPrimitive . Overlay
27
29
className = { cn (
28
- 'bg-background-7/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50' ,
30
+ 'bg-background-7/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50' ,
31
+ { 'bg-background-10/60' : isLightTheme } ,
29
32
className
30
33
) }
31
34
{ ...props }
@@ -37,25 +40,25 @@ const SheetOverlay = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Ove
37
40
return (
38
41
< div
39
42
aria-hidden = "true"
40
- className = { cn ( 'bg-background-7/50 fixed left-0 top-0 h-full w-full' , className ) }
43
+ className = { cn (
44
+ 'layer-high bg-background-7/80 fixed left-0 top-0 h-full w-full' ,
45
+ { 'bg-background-10/60' : isLightTheme } ,
46
+ className
47
+ ) }
41
48
onClick = { e => handleClose ?.( e ) }
42
49
/>
43
50
)
44
51
}
45
52
)
46
53
SheetOverlay . displayName = SheetPrimitive . Overlay . displayName
47
54
48
- const sheetVariants = cva ( 'bg-background fixed z-50 gap-4 p-6 transition ease-in-out' , {
55
+ const sheetVariants = cva ( 'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out' , {
49
56
variants : {
50
57
side : {
51
58
top : 'inset-x-0 top-0 border-b' ,
52
59
bottom : 'inset-x-0 bottom-0 border-t' ,
53
60
left : 'inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm' ,
54
61
right : 'inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm'
55
- } ,
56
- isLightTheme : {
57
- true : 'border-sidebar-border-1 border-l' ,
58
- false : 'shadow-lg'
59
62
}
60
63
} ,
61
64
defaultVariants : {
@@ -89,10 +92,9 @@ const SheetContent = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Con
89
92
ref
90
93
) => {
91
94
const { portalContainer } = usePortal ( )
92
- const { isLightTheme } = useTheme ( )
93
95
94
96
const content = (
95
- < SheetPrimitive . Content ref = { ref } className = { cn ( sheetVariants ( { side, isLightTheme } ) , className ) } { ...props } >
97
+ < SheetPrimitive . Content ref = { ref } className = { cn ( sheetVariants ( { side } ) , className ) } { ...props } >
96
98
{ children }
97
99
{ ! hideCloseButton && (
98
100
< SheetPrimitive . Close
0 commit comments