From 7be26fd020c7a77143fbe1caebed45adcdc53809 Mon Sep 17 00:00:00 2001 From: Eug-VS Date: Tue, 31 Dec 2019 16:13:55 +0300 Subject: Use MUI in Header --- src/components/Header.js | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) (limited to 'src/components/Header.js') diff --git a/src/components/Header.js b/src/components/Header.js index 47da527..4eceb6d 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -1,15 +1,32 @@ import React from "react"; +import { Tab, Tabs, Typography } from "@material-ui/core"; +import styled from 'styled-components'; const Header = () => ( -
- ChronoCube - -
+ + + + + + + + + + ); +const HeaderWrapper = styled.div` + border-bottom: 1px solid black; + background-color: darkgrey; + & .MuiTab-wrapper { + padding: 10px; + } + & .MuiTypography-root { + font-weight: bold; + padding: 10px; + margin-right: 50px; + margin-left: 30px; + } +`; + export default Header; -- cgit v1.2.3 From 7d09949d8903aca282e4349e1ccfd589e59a4624 Mon Sep 17 00:00:00 2001 From: Eug-VS Date: Tue, 31 Dec 2019 16:24:00 +0300 Subject: Use AppBar and wrap the Tabs in a styled component --- src/components/Header.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/components/Header.js') diff --git a/src/components/Header.js b/src/components/Header.js index 4eceb6d..cd217fc 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -1,23 +1,26 @@ import React from "react"; -import { Tab, Tabs, Typography } from "@material-ui/core"; +import { + AppBar, + Tabs, + Tab, + Typography +} from "@material-ui/core"; import styled from 'styled-components'; const Header = () => ( - - + + - - - + + ); -const HeaderWrapper = styled.div` +const TabsWrapper = styled(Tabs)` border-bottom: 1px solid black; - background-color: darkgrey; & .MuiTab-wrapper { padding: 10px; } -- cgit v1.2.3 From 488c4ed02814f35ba33bfd4bd23fa6968717c53b Mon Sep 17 00:00:00 2001 From: Eug-VS Date: Tue, 31 Dec 2019 21:52:45 +0300 Subject: Create page state and pass it to Header --- src/components/Header.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/components/Header.js') diff --git a/src/components/Header.js b/src/components/Header.js index cd217fc..cca73ed 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -7,17 +7,24 @@ import { } from "@material-ui/core"; import styled from 'styled-components'; -const Header = () => ( +const Header = ({ setPage }) => { + + const handleChange = (event, newPage) => { + setPage(newPage); + }; + + return ( - + - - - - + + + + -); + ); +}; const TabsWrapper = styled(Tabs)` border-bottom: 1px solid black; -- cgit v1.2.3 From 3524a41fc77b5fa3e6708cb3067d269d9fe62999 Mon Sep 17 00:00:00 2001 From: Eug-VS Date: Thu, 2 Jan 2020 13:31:20 +0300 Subject: Move Header.js to src/Header and reorder options --- src/components/Header.js | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 src/components/Header.js (limited to 'src/components/Header.js') diff --git a/src/components/Header.js b/src/components/Header.js deleted file mode 100644 index cca73ed..0000000 --- a/src/components/Header.js +++ /dev/null @@ -1,42 +0,0 @@ -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 ( - - - - - - - - - - ); -}; - -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; -- cgit v1.2.3