aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Header
diff options
context:
space:
mode:
authorEugene Sokolov <eug-vs@keemail.me>2020-04-18 21:17:50 +0300
committerGitHub <noreply@github.com>2020-04-18 21:17:50 +0300
commit1d1df03b64d31a9606e494d086eb7ae3bee92681 (patch)
tree5bea19d0bc6afc0440f71fb8df962e29fbb568e2 /src/lib/Header
parentad42e742c04c8302c2bcaf67c07ef215bba04f3b (diff)
parenta31244374f5609e89d8ff22e4111ab04d94886a2 (diff)
downloadreact-benzin-1d1df03b64d31a9606e494d086eb7ae3bee92681.tar.gz
Merge pull request #12 from eug-vs/codestyle
Configure ESlint properly
Diffstat (limited to 'src/lib/Header')
-rw-r--r--src/lib/Header/Header.tsx48
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>
);
};