You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.4 KiB
52 lines
1.4 KiB
4 years ago
|
import AppBar from '@material-ui/core/AppBar';
|
||
|
import { makeStyles, createStyles } from '@material-ui/core/styles';
|
||
4 years ago
|
import { Grid } from '@material-ui/core';
|
||
4 years ago
|
import Image from 'next/image';
|
||
4 years ago
|
import { ICONS, ICON_SIZE } from '../lib/consts/ICONS';
|
||
4 years ago
|
|
||
4 years ago
|
const useStyles = makeStyles((theme) =>
|
||
|
createStyles({
|
||
|
appBar: {
|
||
|
paddingTop: theme.spacing(0.5),
|
||
|
paddingBottom: theme.spacing(0.5),
|
||
|
paddingLeft: theme.spacing(3),
|
||
4 years ago
|
paddingRight: theme.spacing(3),
|
||
|
},
|
||
|
input: {
|
||
|
height: '40px',
|
||
|
width: '500px',
|
||
|
backgroundColor: theme.palette.secondary.main,
|
||
|
borderRadius: '3px',
|
||
4 years ago
|
},
|
||
|
}),
|
||
|
);
|
||
4 years ago
|
|
||
4 years ago
|
const Header = (): JSX.Element => {
|
||
4 years ago
|
const classes = useStyles();
|
||
4 years ago
|
return (
|
||
4 years ago
|
<AppBar position="static" className={classes.appBar}>
|
||
4 years ago
|
<Grid container alignItems="center" justify="space-between">
|
||
4 years ago
|
<Grid item>
|
||
4 years ago
|
<Image src="/pngs/logo.png" width="160" height="40" />
|
||
|
</Grid>
|
||
4 years ago
|
<Grid item>
|
||
4 years ago
|
<input className={classes.input} list="search-suggestions" />
|
||
|
</Grid>
|
||
4 years ago
|
<Grid item>
|
||
4 years ago
|
{ICONS.map(
|
||
|
(icon): JSX.Element => (
|
||
|
<Image
|
||
|
key="icon"
|
||
|
src={icon} // eslint-disable-next-line react/jsx-props-no-spreading
|
||
|
{...ICON_SIZE}
|
||
|
/>
|
||
|
),
|
||
|
)}
|
||
|
</Grid>
|
||
|
</Grid>
|
||
4 years ago
|
</AppBar>
|
||
4 years ago
|
);
|
||
|
};
|
||
|
|
||
|
export default Header;
|