mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
29 lines
790 B
TypeScript
29 lines
790 B
TypeScript
import { AppShell } from '@mantine/core';
|
|
import { useDisclosure } from '@mantine/hooks';
|
|
import { Outlet } from 'react-router-dom';
|
|
import { AppHeader } from './components/AppHeader';
|
|
import { AppSidebar } from './components/AppSidebar';
|
|
|
|
export function BackofficeLayout() {
|
|
const [opened, { toggle }] = useDisclosure();
|
|
|
|
return (
|
|
<AppShell
|
|
header={{ height: 64 }}
|
|
navbar={{ width: 264, breakpoint: 'sm', collapsed: { mobile: !opened } }}
|
|
padding="lg"
|
|
styles={{ main: { backgroundColor: '#f5f7fb' } }}
|
|
>
|
|
<AppShell.Header>
|
|
<AppHeader onToggle={toggle} />
|
|
</AppShell.Header>
|
|
<AppShell.Navbar>
|
|
<AppSidebar />
|
|
</AppShell.Navbar>
|
|
<AppShell.Main>
|
|
<Outlet />
|
|
</AppShell.Main>
|
|
</AppShell>
|
|
);
|
|
}
|