mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 07:55:52 +01:00
24 lines
519 B
TypeScript
24 lines
519 B
TypeScript
|
|
import { AppShell, useMantineTheme } from '@mantine/core';
|
||
|
|
|
||
|
|
import { MainHeader } from './new-header/Header';
|
||
|
|
|
||
|
|
type MainLayoutProps = {
|
||
|
|
children: React.ReactNode;
|
||
|
|
};
|
||
|
|
|
||
|
|
export const MainLayout = ({ children }: MainLayoutProps) => {
|
||
|
|
const theme = useMantineTheme();
|
||
|
|
return (
|
||
|
|
<AppShell
|
||
|
|
styles={{
|
||
|
|
root: {
|
||
|
|
background: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[1],
|
||
|
|
},
|
||
|
|
}}
|
||
|
|
header={<MainHeader />}
|
||
|
|
>
|
||
|
|
{children}
|
||
|
|
</AppShell>
|
||
|
|
);
|
||
|
|
};
|