bbgo_origin/frontend/layouts/PlainLayout.js

44 lines
1.1 KiB
JavaScript
Raw Normal View History

2022-06-11 00:57:54 +00:00
import React from 'react';
2021-02-01 09:13:27 +00:00
2022-06-11 00:57:54 +00:00
import { makeStyles } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
2021-02-01 09:13:27 +00:00
import Container from '@material-ui/core/Container';
const useStyles = makeStyles((theme) => ({
2022-06-11 00:57:54 +00:00
root: {
// flexGrow: 1,
display: 'flex',
},
content: {
flexGrow: 1,
height: '100vh',
overflow: 'auto',
},
appBar: {
zIndex: theme.zIndex.drawer + 1,
},
appBarSpacer: theme.mixins.toolbar,
2021-02-01 09:13:27 +00:00
}));
2022-04-13 16:53:01 +00:00
export default function PlainLayout(props) {
2022-06-11 00:57:54 +00:00
const classes = useStyles();
return (
<div className={classes.root}>
<AppBar className={classes.appBar}>
<Toolbar>
<Typography variant="h6" className={classes.title}>
{props && props.title ? props.title : 'BBGO Setup Wizard'}
</Typography>
</Toolbar>
</AppBar>
2021-02-01 09:13:27 +00:00
2022-06-11 00:57:54 +00:00
<main className={classes.content}>
<div className={classes.appBarSpacer} />
<Container>{props.children}</Container>
</main>
</div>
);
2021-02-01 09:13:27 +00:00
}