@@ -44,7 +44,6 @@ function DrawerContent({
4444 return (
4545 < DrawerPortal data-slot = 'drawer-portal' >
4646 < DrawerOverlay />
47-
4847 < DrawerPrimitive . Content
4948 data-slot = 'drawer-content'
5049 className = { cn (
@@ -70,7 +69,9 @@ function DrawerContent({
7069 < X size = { 32 } strokeWidth = { 1 } />
7170 </ button >
7271 </ DrawerClose >
73- { children }
72+ < div className = 'pt-[4.375rem] px-[0.75rem] md:pt-0 md:pr-[1.5rem] md:pl-[2rem] h-[100vh] undp-scrollbar' >
73+ { children }
74+ </ div >
7475 </ DrawerPrimitive . Content >
7576 </ DrawerPortal >
7677 ) ;
@@ -81,30 +82,52 @@ function DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {
8182 < div
8283 data-slot = 'drawer-header'
8384 className = { cn (
84- 'flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=left]:mt-24 group-data-[vaul-drawer-direction=right]:mt-24 group-data-[vaul-drawer-direction=right]:mr-24 group-data-[vaul-drawer-direction=top]:mt-24 group-data-[vaul-drawer-direction=bottom]:mt-24 group-data-[vaul-drawer-direction=top]:ml-24 group-data-[vaul-drawer-direction=bottom]:ml-24 group-data-[vaul-drawer-direction=left]:mt-24 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left h-[100vh] undp-scrollbar ' ,
85+ 'mt-0 mr-0 ml-[1.875rem] md:mt-[6rem] md:ml-[6rem] group-data-[vaul-drawer-direction=left]:mt-24 group-data-[vaul-drawer-direction=right]:mt-24 group-data-[vaul-drawer-direction=right]:mr-24 group-data-[vaul-drawer-direction=top]:mt-24 group-data-[vaul-drawer-direction=bottom]:mt-24 group-data-[vaul-drawer-direction=top]:ml-24 group-data-[vaul-drawer-direction=bottom]:ml-24 group-data-[vaul-drawer-direction=left]:mt-24 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left' ,
8586 className ,
8687 ) }
8788 { ...props }
8889 />
8990 ) ;
9091}
9192
93+ function DrawerBody ( { className, ...props } : React . ComponentProps < 'div' > ) {
94+ return < div data-slot = 'drawer-header' className = { cn ( 'mt-20' , className ) } { ...props } /> ;
95+ }
96+
9297function DrawerFooter ( { className, ...props } : React . ComponentProps < 'div' > ) {
9398 return (
9499 < div
95100 data-slot = 'drawer-footer'
96- className = { cn ( 'mt-auto flex flex-col gap-2 p-4' , className ) }
101+ className = { cn ( 'mt-auto flex flex-col gap-2 p-4 absolute bottom-0 ' , className ) }
97102 { ...props }
98103 />
99104 ) ;
100105}
101106
102107function DrawerTitle ( { ...props } : React . ComponentProps < typeof DrawerPrimitive . Title > ) {
103- return < DrawerPrimitive . Title data-slot = 'drawer-title' { ...props } /> ;
108+ return (
109+ < DrawerPrimitive . Title
110+ data-slot = 'drawer-title'
111+ { ...props }
112+ className = { cn (
113+ 'font-heading mb-4 text-[1.563rem] leading-[1.1] uppercase font-bold md:text-[3.438rem]' ,
114+ props . className ,
115+ ) }
116+ />
117+ ) ;
104118}
105119
106120function DrawerDescription ( { ...props } : React . ComponentProps < typeof DrawerPrimitive . Description > ) {
107- return < DrawerPrimitive . Description data-slot = 'drawer-description' { ...props } /> ;
121+ return (
122+ < DrawerPrimitive . Description
123+ data-slot = 'drawer-description'
124+ { ...props }
125+ className = { cn (
126+ 'text-[1.25rem] mb-4 leading-[1.15] font-semibold md:text-[2.188rem]' ,
127+ props . className ,
128+ ) }
129+ />
130+ ) ;
108131}
109132
110133export {
@@ -118,4 +141,5 @@ export {
118141 DrawerFooter ,
119142 DrawerTitle ,
120143 DrawerDescription ,
144+ DrawerBody ,
121145} ;
0 commit comments