fix: Sidebar positioning - remove inset-y-0 conflict

- Fixed sidebar to not use inset-y-0 (was overriding top offset)
- Mobile: fixed positioning with sidebarTopClass
- Desktop: lg:sticky for proper sticky behavior
This commit is contained in:
Dwindi Ramadhana
2026-01-04 12:30:46 +07:00
parent bfb961ccbe
commit 3a8c436839

View File

@@ -96,14 +96,16 @@ export default function Help() {
{sidebarOpen ? <X className="w-5 h-5" /> : <Menu className="w-5 h-5" />}
</Button>
{/* Sidebar - sticky, positioned below header */}
{/* Sidebar - sticky on desktop, fixed on mobile */}
<aside
className={cn(
"w-72 border-r bg-muted/30 flex-shrink-0",
"fixed lg:sticky inset-y-0 left-0 z-40",
"w-72 border-r bg-muted/30 flex-shrink-0 overflow-y-auto",
// Mobile: fixed position covering from below header
"fixed left-0 z-40",
sidebarTopClass,
sidebarHeightClass,
"lg:block overflow-y-auto",
// Desktop: sticky instead of fixed
"lg:sticky",
sidebarOpen ? "block" : "hidden lg:block"
)}
>