blob: 2dda7178559ccac6cde5b21843ff02e1560bf1e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
import React from 'react';
import { AppBar, Toolbar } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
import SearchBar from './SearchBar';
interface PropTypes {
logo: JSX.Element;
feed: JSX.Element;
notifications: JSX.Element;
profile: JSX.Element;
}
const useStyles = makeStyles({
root: {
width: '60%',
margin: 'auto',
display: 'flex',
justifyContent: 'space-around'
},
group: {
display: 'flex'
}
});
const BrowserHeader: React.FC<PropTypes> = React.memo(props => {
const classes = useStyles();
const {
logo,
feed,
notifications,
profile
} = props;
return (
<AppBar position="fixed">
<Toolbar className={classes.root}>
{logo}
<SearchBar />
<div className={classes.group}>
{feed}
{notifications}
{profile}
</div>
</Toolbar>
</AppBar>
);
});
export default BrowserHeader;
|