@@ -89,27 +89,35 @@ function MobileDocsDrawer({
8989 const scrollContainerRef = useRef < HTMLDivElement > ( null ) ;
9090
9191 return (
92- < div
93- className = { `fixed top-[69px] left-0 h-[calc(100vh-69px)] w-72 bg-white/80 backdrop-blur-sm border-r border-neutral-100 shadow-2xl shadow-neutral-900/20 z-50 md:hidden transition-transform duration-300 ease-in-out ${
94- isOpen ? "translate-x-0" : "-translate-x-full"
95- } `}
96- style = { {
97- paddingLeft : "env(safe-area-inset-left)" ,
98- } }
99- >
92+ < >
93+ { isOpen && (
94+ < div
95+ className = "fixed inset-0 top-[69px] z-40 md:hidden"
96+ onClick = { onClose }
97+ />
98+ ) }
10099 < div
101- ref = { scrollContainerRef }
102- className = "h-full overflow-y-auto scrollbar-hide p-4"
100+ className = { `fixed top-[69px] left-0 h-[calc(100vh-69px)] w-72 bg-white/80 backdrop-blur-sm border-r border-neutral-100 shadow-2xl shadow-neutral-900/20 z-50 md:hidden transition-transform duration-300 ease-in-out ${
101+ isOpen ? "translate-x-0" : "-translate-x-full"
102+ } `}
103+ style = { {
104+ paddingLeft : "env(safe-area-inset-left)" ,
105+ } }
103106 >
104- < SidebarNavigation
105- sections = { sections }
106- currentSlug = { currentSlug }
107- onLinkClick = { onClose }
108- scrollContainerRef = { scrollContainerRef }
109- linkTo = "/docs/$"
110- />
107+ < div
108+ ref = { scrollContainerRef }
109+ className = "h-full overflow-y-auto scrollbar-hide p-4"
110+ >
111+ < SidebarNavigation
112+ sections = { sections }
113+ currentSlug = { currentSlug }
114+ onLinkClick = { onClose }
115+ scrollContainerRef = { scrollContainerRef }
116+ linkTo = "/docs/$"
117+ />
118+ </ div >
111119 </ div >
112- </ div >
120+ </ >
113121 ) ;
114122}
115123
@@ -168,26 +176,34 @@ function MobileHandbookDrawer({
168176 const scrollContainerRef = useRef < HTMLDivElement > ( null ) ;
169177
170178 return (
171- < div
172- className = { `fixed top-[69px] left-0 h-[calc(100vh-69px)] w-72 bg-white/80 backdrop-blur-sm border-r border-neutral-100 shadow-2xl shadow-neutral-900/20 z-50 md:hidden transition-transform duration-300 ease-in-out ${
173- isOpen ? "translate-x-0" : "-translate-x-full"
174- } `}
175- style = { {
176- paddingLeft : "env(safe-area-inset-left)" ,
177- } }
178- >
179+ < >
180+ { isOpen && (
181+ < div
182+ className = "fixed inset-0 top-[69px] z-40 md:hidden"
183+ onClick = { onClose }
184+ />
185+ ) }
179186 < div
180- ref = { scrollContainerRef }
181- className = "h-full overflow-y-auto scrollbar-hide p-4"
187+ className = { `fixed top-[69px] left-0 h-[calc(100vh-69px)] w-72 bg-white/80 backdrop-blur-sm border-r border-neutral-100 shadow-2xl shadow-neutral-900/20 z-50 md:hidden transition-transform duration-300 ease-in-out ${
188+ isOpen ? "translate-x-0" : "-translate-x-full"
189+ } `}
190+ style = { {
191+ paddingLeft : "env(safe-area-inset-left)" ,
192+ } }
182193 >
183- < SidebarNavigation
184- sections = { handbooksBySection . sections }
185- currentSlug = { currentSlug }
186- onLinkClick = { onClose }
187- scrollContainerRef = { scrollContainerRef }
188- linkTo = "/company-handbook/$"
189- />
194+ < div
195+ ref = { scrollContainerRef }
196+ className = "h-full overflow-y-auto scrollbar-hide p-4"
197+ >
198+ < SidebarNavigation
199+ sections = { handbooksBySection . sections }
200+ currentSlug = { currentSlug }
201+ onLinkClick = { onClose }
202+ scrollContainerRef = { scrollContainerRef }
203+ linkTo = "/company-handbook/$"
204+ />
205+ </ div >
190206 </ div >
191- </ div >
207+ </ >
192208 ) ;
193209}
0 commit comments