@@ -6,29 +6,48 @@ import UseTimeDemo from './components/UseTimeDemo';
66
77const GlobalStyle = createGlobalStyle `
88 html, body {
9- padding: 0;
109 margin: 0;
11- background-color: #232323;
1210 font-family: Arial;
13- color: white;
11+ text-align: left;
12+ color: #404549;
1413 }
14+ h2 {
15+ margin-top: 20px;
16+ }
17+ ` ;
18+
19+ const StyledContainer = styled . div `
20+ width: 1170px;
21+ margin-left: auto;
22+ margin-right: auto;
1523` ;
1624
1725const StyledApp = styled . div `
1826 flex: 1;
19- width: 100%;
20- height: 100%;
2127` ;
2228
23- const StyledHeader = styled . h1 `
24- text-align: center;
29+ const HeaderBG = styled . div `
30+ background-color: #404549;
31+ ` ;
32+
33+ const StyledHeader = styled . div `
34+ display: flex;
35+ justify-content: space-between;
36+ align-items: center;
37+
38+ & h1 {
39+ margin: 20px 0;
40+ }
41+ ` ;
42+
43+ const StyledH1 = styled . h1 `
2544 color: white;
2645` ;
2746
2847const StyledSeparator = styled . div `
29- height: 3px;
30- background-color: white;
48+ height: 0px;
3149 margin-top: 30px;
50+ border: dashed 2px #404549;
3251` ;
3352
3453export default function App ( ) {
@@ -38,13 +57,28 @@ export default function App() {
3857 return (
3958 < StyledApp >
4059 < GlobalStyle />
41- < StyledHeader > react-timer-hook</ StyledHeader >
42- < UseTimerDemo expiryTimestamp = { time } />
43- < StyledSeparator />
44- < UseStopwatchDemo />
45- < StyledSeparator />
46- < UseTimeDemo />
47- < StyledSeparator />
60+ < HeaderBG >
61+ < StyledContainer >
62+ < StyledHeader >
63+ < StyledH1 > react-timer-hook</ StyledH1 >
64+ < div >
65+ < iframe src = "https://ghbtns.com/github-btn.html?user=amrlabib& repo = react - timer - hook & type = star & count = true & size = large " frameborder = "0" scrolling = "0" width = "160" height = "30" title = "GitHub" />
66+ < iframe src = "https://ghbtns.com/github-btn.html?user=amrlabib& repo = react - timer - hook & type = fork & count = true & size = large " frameborder = "0" scrolling = "0" width = "126" height = "30" title = "GitHub" />
67+ </ div >
68+ </ StyledHeader >
69+ </ StyledContainer >
70+ </ HeaderBG >
71+ < StyledContainer >
72+ < p >
73+ React timer hook is a custom < a href = "https://reactjs.org/docs/hooks-intro.html" target = "_blank" > react hook</ a > ,
74+ built to handle timer, stopwatch, and time logic/state in your react component.
75+ </ p >
76+ < UseTimerDemo expiryTimestamp = { time } />
77+ < StyledSeparator />
78+ < UseStopwatchDemo />
79+ < StyledSeparator />
80+ < UseTimeDemo />
81+ </ StyledContainer >
4882 </ StyledApp >
4983 ) ;
5084}
0 commit comments