Skip to content

Commit a1ac4b1

Browse files
authored
Merge pull request #359 from GTBitsOfGood/vivian/resize-window-change-ui-placement
Fix: Keep buttons inside sidebar
2 parents 0f761c6 + b118ac1 commit a1ac4b1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/components/NavBarLayout.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ function NavLinks({
199199
{isPartnerUser ? (user?.siteName ?? user?.name) : user?.name}
200200
</p>
201201
</li>
202-
<ul className="flex gap-2">
202+
<ul className="flex flex-row sm:flex-col md:flex-row gap-2">
203203
<li className="flex-1 mt-auto">
204204
<NavLink
205205
href="/profile"
@@ -301,7 +301,7 @@ function DesktopNavbar() {
301301

302302
<hr className="mt-2 mb-4 h-1 bg-blue-dark border-t-0 w-full" />
303303

304-
<ul className="p-1 w-full flex flex-col flex-1 flex-grow">
304+
<ul className="p-1 w-full flex flex-col flex-1 min-h-0 overflow-y-auto">
305305
<NavLinks includeTutorialTargets />
306306
</ul>
307307
</nav>
@@ -322,7 +322,7 @@ function MobileNavbar() {
322322

323323
return (
324324
<nav
325-
className={`fixed top-4 right-4 p-4 rounded-lg sm:hidden overflow-hidden transition-all ${open ? "w-64 h-[30rem] bg-blue-light" : "w-12 h-12"}`}
325+
className={`fixed top-4 right-4 p-4 rounded-lg sm:hidden overflow-hidden transition-all ${open ? "w-64 h-[30rem] max-h-[calc(100dvh-2rem)] bg-blue-light" : "w-12 h-12"}`}
326326
>
327327
<div
328328
className={`w-full h-full flex flex-col items-start transition-all ${open ? "opacity-100" : "opacity-0"}`}
@@ -333,7 +333,7 @@ function MobileNavbar() {
333333

334334
<hr className="mt-4 mb-3 h-0.5 bg-blue-dark border-t-0 w-full" />
335335

336-
<ul className="flex-1 flex flex-col w-full">
336+
<ul className="flex-1 min-h-0 overflow-y-auto flex flex-col w-full">
337337
<NavLinks />
338338
</ul>
339339
</div>

0 commit comments

Comments
 (0)