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:
@@ -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"
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user