added header
This commit is contained in:
parent
791378d959
commit
0d5d2e821f
5 changed files with 360 additions and 43 deletions
62
src/app/Header.tsx
Normal file
62
src/app/Header.tsx
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
import { AppBar, Box, IconButton, Theme, Toolbar } from "@mui/material";
|
||||
import { Menu } from "@mui/icons-material";
|
||||
import classNames from "classnames";
|
||||
import { makeStyles } from "@mui/styles";
|
||||
import { getSignatureAccentColour } from "../services/whiteLabel";
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) => ({
|
||||
appBar: {
|
||||
// zIndex: 10, // TODO: make variables to keep zIndex consistent
|
||||
zIndex: theme.zIndex.drawer + 1
|
||||
},
|
||||
toolbar: {
|
||||
marginLeft: theme.spacing(0.5),
|
||||
[theme.breakpoints.up("md")]: {
|
||||
marginLeft: theme.spacing(1.5)
|
||||
}
|
||||
},
|
||||
buttonContainer: {
|
||||
marginRight: theme.spacing(0.5),
|
||||
[theme.breakpoints.up("md")]: {
|
||||
marginRight: theme.spacing(1.5)
|
||||
}
|
||||
},
|
||||
button: {
|
||||
color: getSignatureAccentColour()
|
||||
},
|
||||
hide: {
|
||||
display: "none"
|
||||
},
|
||||
}));
|
||||
|
||||
interface Props {
|
||||
// toggleTheme: () => void;
|
||||
sideIsOpen: boolean;
|
||||
openSide: () => void;
|
||||
// teams: Team[];
|
||||
// setTeams: React.Dispatch<React.SetStateAction<Team[]>>;
|
||||
}
|
||||
|
||||
export default function Header(props: Props) {
|
||||
|
||||
const { sideIsOpen, openSide} = props;
|
||||
const classes = useStyles()
|
||||
|
||||
return (
|
||||
<AppBar position="fixed" className={classes.appBar}>
|
||||
<Toolbar disableGutters className={classes.toolbar}>
|
||||
<Box className={classes.buttonContainer}>
|
||||
{/* {!isMobile && ( */}
|
||||
<IconButton
|
||||
color="inherit"
|
||||
aria-label="Open side menu"
|
||||
onClick={openSide}
|
||||
className={classNames(classes.button, sideIsOpen && classes.hide)}>
|
||||
<Menu />
|
||||
</IconButton>
|
||||
{/* )} */}
|
||||
</Box>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue