File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,18 +19,21 @@ function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.C
1919 return < DrawerPrimitive . Close data-slot = "drawer-close" { ...props } />
2020}
2121
22- function DrawerOverlay ( { className, ...props } : React . ComponentProps < typeof DrawerPrimitive . Overlay > ) {
23- return (
24- < DrawerPrimitive . Overlay
25- data-slot = "drawer-overlay"
26- className = { cn (
27- '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 bg-black/50' ,
28- className
29- ) }
30- { ...props }
31- />
32- )
33- }
22+ const DrawerOverlay = React . forwardRef < HTMLDivElement , React . ComponentProps < typeof DrawerPrimitive . Overlay > > (
23+ ( { className, ...props } , ref ) => {
24+ return (
25+ < DrawerPrimitive . Overlay
26+ ref = { ref }
27+ data-slot = "drawer-overlay"
28+ className = { cn (
29+ '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 bg-black/50' ,
30+ className
31+ ) }
32+ { ...props }
33+ />
34+ )
35+ }
36+ )
3437
3538function DrawerContent ( {
3639 className,
You can’t perform that action at this time.
0 commit comments