Sidebar mobile friendly

This commit is contained in:
2025-12-26 21:22:17 +01:00
parent 225eea0861
commit 947b9e0f1b
3 changed files with 114 additions and 73 deletions
+9 -6
View File
@@ -1,6 +1,7 @@
import { ReactNode } from "react";
import { DashboardSidebar } from "./DashboardSidebar";
import { DashboardHeader } from "./DashboardHeader";
import { SidebarProvider } from "../ui/sidebar";
interface DashboardLayoutProps {
children: ReactNode;
@@ -8,16 +9,18 @@ interface DashboardLayoutProps {
subtitle?: string;
}
export function DashboardLayout({ children, title, subtitle }: DashboardLayoutProps) {
export function DashboardLayout({
children,
title,
subtitle,
}: DashboardLayoutProps) {
return (
<div className="flex h-screen w-full bg-background">
<SidebarProvider>
<DashboardSidebar />
<div className="flex-1 flex flex-col overflow-hidden">
<DashboardHeader title={title} subtitle={subtitle} />
<main className="flex-1 overflow-auto p-6">
{children}
</main>
<main className="flex-1 overflow-auto p-6">{children}</main>
</div>
</div>
</SidebarProvider>
);
}