diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2020-04-18 21:31:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 21:31:11 +0300 |
commit | dee39c8ff8e9a417ba2b338beb942f9ad443adf3 (patch) | |
tree | a6b1bfa00f5ad925d57d3ded655a8103b911fad4 /src/lib/Header/Header.tsx | |
parent | 62df0ff96fc9ab832212d223150862c7667d9ffc (diff) | |
parent | 0c061c74bfd473be17be755cd19c8952dc115a91 (diff) | |
download | react-benzin-dee39c8ff8e9a417ba2b338beb942f9ad443adf3.tar.gz |
Merge pull request #13 from eug-vs/develop
Patch 3.1.1
Diffstat (limited to 'src/lib/Header/Header.tsx')
-rw-r--r-- | src/lib/Header/Header.tsx | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/src/lib/Header/Header.tsx b/src/lib/Header/Header.tsx index 233eacb..58be989 100644 --- a/src/lib/Header/Header.tsx +++ b/src/lib/Header/Header.tsx @@ -40,13 +40,15 @@ const useStyles = makeStyles(theme => ({ '& svg': { marginRight: theme.spacing(1), marginBottom: '0 !important', - } - } - } + }, + }, + }, })); -const Header: React.FC<PropTypes> = ({ logo, contents, page, setPage }) => { +const Header: React.FC<PropTypes> = ({ + logo, contents, page, setPage, +}) => { const classes = useStyles(); const handleChange = (event: React.ChangeEvent<{}>, newPage: string): void => { @@ -54,25 +56,25 @@ const Header: React.FC<PropTypes> = ({ logo, contents, page, setPage }) => { }; return ( - <AppBar position="sticky" className={classes.root}> - <Toolbar> - {logo.icon} - <Typography variant="h5" className={classes.logo} color="primary"> - {logo.title} - </Typography> - <Tabs onChange={handleChange} value={page}> - {contents && Object.keys(contents).map((item: string) => ( - <Tab - label={item} - icon={contents[item] as JSX.Element} - value={item} - className={classes.tab} - key={item} - /> - ))} - </Tabs> - </Toolbar> - </AppBar> + <AppBar position="sticky" className={classes.root}> + <Toolbar> + {logo.icon} + <Typography variant="h5" className={classes.logo} color="primary"> + {logo.title} + </Typography> + <Tabs onChange={handleChange} value={page}> + {contents && Object.keys(contents).map((item: string) => ( + <Tab + label={item} + icon={contents[item] as JSX.Element} + value={item} + className={classes.tab} + key={item} + /> + ))} + </Tabs> + </Toolbar> + </AppBar> ); }; |