diff options
author | Eug-VS <eug-vs@keemail.me> | 2020-01-02 13:31:20 +0300 |
---|---|---|
committer | Eug-VS <eug-vs@keemail.me> | 2020-01-02 13:31:20 +0300 |
commit | 3524a41fc77b5fa3e6708cb3067d269d9fe62999 (patch) | |
tree | eb73c125f30e86b87824756ba68dcc5451d16564 /src/components/Header/Header.js | |
parent | 488c4ed02814f35ba33bfd4bd23fa6968717c53b (diff) | |
download | chrono-cube-ui-3524a41fc77b5fa3e6708cb3067d269d9fe62999.tar.gz |
Move Header.js to src/Header and reorder options
Diffstat (limited to 'src/components/Header/Header.js')
-rw-r--r-- | src/components/Header/Header.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/components/Header/Header.js b/src/components/Header/Header.js new file mode 100644 index 0000000..9bfe5c4 --- /dev/null +++ b/src/components/Header/Header.js @@ -0,0 +1,42 @@ +import React from "react"; +import { + AppBar, + Tabs, + Tab, + Typography +} from "@material-ui/core"; +import styled from 'styled-components'; + +const Header = ({ setPage }) => { + + const handleChange = (event, newPage) => { + setPage(newPage); + }; + + return ( + <AppBar position="static"> + <TabsWrapper onChange={handleChange}> + <Typography variant="h4" id="logo"> ChronoCube </Typography> + <Tab label="App" value="app"/> + <Tab label="Profile" value="profile"/> + <Tab label="Scoreboard" value="scoreboard"/> + <Tab label="News" value="news"/> + </TabsWrapper> + </AppBar> + ); +}; + +const TabsWrapper = styled(Tabs)` + border-bottom: 1px solid black; + & .MuiTab-wrapper { + padding: 10px; + } + & .MuiTypography-root { + font-weight: bold; + padding: 10px; + margin-right: 50px; + margin-left: 30px; + } +`; + +export default Header; |