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

interface PropTypes {
  page: string;
  setPage: (newPage: string) => void;
}

const useStyles = makeStyles(theme => ({
  tab: {
    '& .MuiTab-wrapper': {
        padding: theme.spacing(2),
        flexDirection: 'row',
        fontSize: '0.8125rem'
    }
  }
}));

const tabs = ["Profile", "Feed"];

const Header: React.FC<PropTypes> = ({ page, setPage }) => {
  const classes = useStyles();

  const handleChange = () => {}

  return (
    <AppBar position="static">
      <Toolbar> 
        <Tabs onChange={handleChange} value={page}>
          {tabs.map((tab: string) => (
            <Tab
              label={tab}
              key={tab}
              className={classes.tab}
            />
          ))}
        </Tabs>
      </Toolbar>
    </AppBar>
  )
};

export default Header;