mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-12 00:15:48 +01:00
🚧 Add board, Improve header
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user