Initial commit
This commit is contained in:
20
meal-plan-frontend/src/components/layout/AppLayout.tsx
Normal file
20
meal-plan-frontend/src/components/layout/AppLayout.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { useState } from "react";
|
||||
import { Outlet } from "react-router-dom";
|
||||
import { Navbar } from "./Navbar";
|
||||
import { Sidebar } from "./Sidebar";
|
||||
|
||||
export function AppLayout() {
|
||||
const [sidebarOpen, setSidebarOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<div className="min-h-screen lg:flex">
|
||||
<Sidebar open={sidebarOpen} onNavigate={() => setSidebarOpen(false)} />
|
||||
<div className="flex min-h-screen flex-1 flex-col">
|
||||
<Navbar onToggleSidebar={() => setSidebarOpen((v) => !v)} />
|
||||
<main className="mx-auto w-full max-w-6xl flex-1 px-4 py-6 sm:px-6 sm:py-8">
|
||||
<Outlet />
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user