251127:1700 Frontend Start Build
This commit is contained in:
21
frontend/components/layout/dashboard-shell.tsx
Normal file
21
frontend/components/layout/dashboard-shell.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
// File: components/layout/dashboard-shell.tsx
|
||||
"use client";
|
||||
|
||||
import { useUIStore } from "@/lib/stores/ui-store";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
export function DashboardShell({ children }: { children: React.ReactNode }) {
|
||||
const { isSidebarOpen } = useUIStore();
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"flex flex-col min-h-screen transition-all duration-300 ease-in-out",
|
||||
// ปรับ Margin ซ้าย ตามสถานะ Sidebar
|
||||
isSidebarOpen ? "md:ml-[240px]" : "md:ml-[70px]"
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user