aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Header.js15
-rw-r--r--src/components/Header/Header.js42
2 files changed, 42 insertions, 15 deletions
diff --git a/src/components/Header.js b/src/components/Header.js
deleted file mode 100644
index 47da527..0000000
--- a/src/components/Header.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import React from "react";
-
-const Header = () => (
- <div>
- <span> ChronoCube </span>
- <ul>
- <li> Home </li>
- <li> App </li>
- <li> Scoreboard </li>
- <li> News </li>
- </ul>
- </div>
-);
-
-export default Header;
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;