🚧 Add board, Improve header

This commit is contained in:
Meier Lukas
2023-07-30 01:09:10 +02:00
parent b19d489a4c
commit e1aaf82602
9 changed files with 300 additions and 46 deletions

View File

@@ -1,13 +1,19 @@
import { AppShell, useMantineTheme } from '@mantine/core';
import { AppShell, clsx, useMantineTheme } from '@mantine/core';
import { useConfigContext } from '~/config/provider';
import { Background } from './Background';
import { Head } from './Meta/Head';
import { MainHeader } from './new-header/Header';
type MainLayoutProps = {
headerActions?: React.ReactNode;
children: React.ReactNode;
};
export const MainLayout = ({ children }: MainLayoutProps) => {
export const MainLayout = ({ headerActions, children }: MainLayoutProps) => {
const { config } = useConfigContext();
const theme = useMantineTheme();
return (
<AppShell
styles={{
@@ -15,9 +21,13 @@ export const MainLayout = ({ children }: MainLayoutProps) => {
background: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[1],
},
}}
header={<MainHeader />}
header={<MainHeader headerActions={headerActions} />}
className="dashboard-app-shell"
>
<Head />
<Background />
{children}
<style>{clsx(config?.settings.customization.customCss)}</style>
</AppShell>
);
};