Add contentComponents to the main layout

Return button is not inside of the header.
This commit is contained in:
ajnart
2023-08-14 10:15:12 +02:00
parent b249c0205f
commit ce5552c913
6 changed files with 31 additions and 13 deletions

View File

@@ -4,10 +4,11 @@ import { MainHeader } from '~/components/layout/header/Header';
type MainLayoutProps = {
showExperimental?: boolean;
headerActions?: React.ReactNode;
contentComponents?: React.ReactNode;
children: React.ReactNode;
};
export const MainLayout = ({ showExperimental, headerActions, children }: MainLayoutProps) => {
export const MainLayout = ({ showExperimental, headerActions, contentComponents, children }: MainLayoutProps) => {
const theme = useMantineTheme();
return (
@@ -17,7 +18,7 @@ export const MainLayout = ({ showExperimental, headerActions, children }: MainLa
background: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[1],
},
}}
header={<MainHeader headerActions={headerActions} showExperimental={showExperimental} />}
header={<MainHeader headerActions={headerActions} contentComponents={contentComponents} showExperimental={showExperimental} />}
className="dashboard-app-shell"
>
{children}