aboutsummaryrefslogtreecommitdiff
path: root/src/components/Header/BottomBar.tsx
blob: 67fe21965844840ffc1e1c2b67bd8f458345eaf2 (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
import React from 'react';
import { AppBar, Toolbar } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';

interface PropTypes {
  profile: JSX.Element;
  feed: JSX.Element;
  notifications: JSX.Element;
}

const useStyles = makeStyles({
  root: {
    top: 'auto',
    bottom: 0
  },
  toolbar: {
    display: 'flex',
    justifyContent: 'space-around'
  }
});


const BottomBar: React.FC<PropTypes> = React.memo(props => {
  const classes = useStyles();
  const { profile, feed, notifications } = props;

  return (
    <AppBar position="fixed" className={classes.root}>
      <Toolbar className={classes.toolbar}>
        {notifications}
        {feed}
        {profile}
      </Toolbar>
    </AppBar>
  );
});

export default BottomBar;