mirror of
https://github.com/ajnart/homarr.git
synced 2026-01-21 15:02:29 +01:00
27 lines
652 B
TypeScript
27 lines
652 B
TypeScript
import { AppShell, useMantineTheme } from '@mantine/core';
|
|
|
|
import { MainHeader } from '~/components/layout/header/Header';
|
|
|
|
type MainLayoutProps = {
|
|
headerActions?: React.ReactNode;
|
|
children: React.ReactNode;
|
|
};
|
|
|
|
export const MainLayout = ({ headerActions, children }: MainLayoutProps) => {
|
|
const theme = useMantineTheme();
|
|
|
|
return (
|
|
<AppShell
|
|
styles={{
|
|
root: {
|
|
background: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[1],
|
|
},
|
|
}}
|
|
header={<MainHeader headerActions={headerActions} />}
|
|
className="dashboard-app-shell"
|
|
>
|
|
{children}
|
|
</AppShell>
|
|
);
|
|
};
|