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" />}
|
{sidebarOpen ? <X className="w-5 h-5" /> : <Menu className="w-5 h-5" />}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
{/* Sidebar - sticky, positioned below header */}
|
{/* Sidebar - sticky on desktop, fixed on mobile */}
|
||||||
<aside
|
<aside
|
||||||
className={cn(
|
className={cn(
|
||||||
"w-72 border-r bg-muted/30 flex-shrink-0",
|
"w-72 border-r bg-muted/30 flex-shrink-0 overflow-y-auto",
|
||||||
"fixed lg:sticky inset-y-0 left-0 z-40",
|
// Mobile: fixed position covering from below header
|
||||||
|
"fixed left-0 z-40",
|
||||||
sidebarTopClass,
|
sidebarTopClass,
|
||||||
sidebarHeightClass,
|
sidebarHeightClass,
|
||||||
"lg:block overflow-y-auto",
|
// Desktop: sticky instead of fixed
|
||||||
|
"lg:sticky",
|
||||||
sidebarOpen ? "block" : "hidden lg:block"
|
sidebarOpen ? "block" : "hidden lg:block"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user