Files
lcbp3/frontend/components/layout/dashboard-shell.tsx
T
admin 11984bfa29
CI Pipeline / build (push) Failing after 12m41s
Build and Deploy / deploy (push) Failing after 2m44s
260322:1648 Correct Coresspondence / Doing RFA / Correct CI
2026-03-22 16:48:12 +07:00

22 lines
573 B
TypeScript

// 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>
);
}