frontPanel/src/pages/main.tsx

33 lines
951 B
TypeScript
Raw Normal View History

import Header from '@ui_kit/Header/Header';
import Sidebar from '@ui_kit/Sidebar';
2023-03-01 22:59:51 +00:00
import Box from '@mui/material/Box';
import {Outlet} from "react-router-dom";
import {useTheme} from "@mui/material";
export default function Main (sidebar: boolean) {
2023-03-01 22:59:51 +00:00
const theme = useTheme();
return (
<>
<Header isLoggedIn={true}/>
<Box sx={{
display: 'flex'
}}
>
<Sidebar sidebar={sidebar} />
2023-03-01 22:59:51 +00:00
<Box
sx={{
background: theme.palette.background.default,
width: '100%',
2023-03-22 22:49:51 +00:00
padding: '25px',
2023-03-22 22:56:18 +00:00
height: 'calc(100vh - 80px)',
2023-03-22 22:58:18 +00:00
overflow: 'auto',
boxSizing: "border-box"
2023-03-01 22:59:51 +00:00
}}
>
<Outlet />
</Box>
</Box>
</>
)
}