Add basic layout

This commit is contained in:
2021-10-14 20:42:49 +02:00
parent adc12fcae3
commit 471165d949
25 changed files with 662 additions and 265 deletions

View File

@@ -0,0 +1,34 @@
import { FC } from "react";
import { AppBar, Box, Container, Toolbar, Typography } from "@mui/material";
import { Styling } from "../general/styling";
import { DefaultNavbar } from "./defaultNavbar";
export const DefaultLayout: FC = ({ children }) => (
<Styling>
<Box
sx={{
display: "flex",
width: "100%",
minHeight: "100vh",
bgcolor: "background.default",
color: "text.primary",
flexDirection: "column",
}}
>
<AppBar position="sticky">
<Toolbar>
<Typography variant="h6" component="div" sx={{ flexGrow: 1 }}>
OpenFood
</Typography>
</Toolbar>
</AppBar>
<Box sx={{ flexGrow: 1, pt: 2 }}>
<Container maxWidth="sm">
<DefaultNavbar />
<Box sx={{ p: 2 }}>{children}</Box>
</Container>
</Box>
</Box>
</Styling>
);