website refactor
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { ReactNode } from 'react';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { useSidebar } from '@/components/layout/SidebarContext';
|
||||
|
||||
export interface LayoutProps {
|
||||
children: ReactNode;
|
||||
@@ -23,9 +22,9 @@ export const Layout = ({
|
||||
sidebar,
|
||||
fixedSidebar = true,
|
||||
fixedHeader = true,
|
||||
fixedFooter = true
|
||||
}: LayoutProps) => {
|
||||
const { isCollapsed } = useSidebar();
|
||||
fixedFooter = true,
|
||||
isCollapsed = false
|
||||
}: LayoutProps & { isCollapsed?: boolean }) => {
|
||||
const sidebarWidth = isCollapsed ? '20' : '64'; // 5rem vs 16rem
|
||||
const sidebarWidthClass = isCollapsed ? 'lg:w-20' : 'lg:w-64';
|
||||
const contentMarginClass = isCollapsed ? 'lg:ml-20' : 'lg:ml-64';
|
||||
|
||||
Reference in New Issue
Block a user