Update root sidebar header and actions

This commit is contained in:
MOH
2026-03-07 18:37:40 +01:00
parent 4f983f20b5
commit 02891ec45b
3 changed files with 29 additions and 33 deletions
+5 -3
View File
@@ -18,6 +18,7 @@ type DashboardLayoutProps = {
description: string;
icon?: LucideIcon;
items: RootNavItem[];
sidebarTop?: ReactNode;
sidebarFooter?: ReactNode;
headerActions?: ReactNode;
children: ReactNode;
@@ -28,6 +29,7 @@ export function DashboardLayout({
description,
icon: Icon,
items,
sidebarTop,
sidebarFooter,
headerActions,
children,
@@ -35,8 +37,8 @@ export function DashboardLayout({
return (
<div className="min-h-screen bg-muted/30">
<div className="grid min-h-screen lg:grid-cols-[280px_minmax(0,1fr)]">
<aside className="hidden border-r border-border/70 bg-sidebar/60 lg:block">
<DashboardSidebar items={items} footer={sidebarFooter} />
<aside className="hidden border-r border-border/70 bg-sidebar/60 lg:sticky lg:top-0 lg:block lg:h-screen">
<DashboardSidebar items={items} top={sidebarTop} footer={sidebarFooter} />
</aside>
<div className="flex min-w-0 flex-1 flex-col">
@@ -52,7 +54,7 @@ export function DashboardLayout({
<SheetTitle>{title}</SheetTitle>
<SheetDescription>{description}</SheetDescription>
</SheetHeader>
<DashboardSidebar items={items} footer={sidebarFooter} />
<DashboardSidebar items={items} top={sidebarTop} footer={sidebarFooter} />
</SheetContent>
</Sheet>