Skip to content

Commit 5c02d7a

Browse files
committed
add: new Main page/component.
1 parent 458b965 commit 5c02d7a

File tree

4 files changed

+62
-1
lines changed

4 files changed

+62
-1
lines changed

src/App.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import React, { Fragment } from 'react';
22
import GlobalStyle from './styles/global';
33

4+
import Main from './pages/Main';
5+
46
const App = () => (
57
<Fragment>
68
<GlobalStyle />
7-
<div className="App" />
9+
<Main />
810
</Fragment>
911
);
1012

src/assets/logo.png

3.82 KB
Loading

src/pages/Main.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import React from 'react';
2+
import styled from 'styled-components';
3+
4+
import Logo from '../assets/logo.png';
5+
6+
const Container = styled.div`
7+
display: flex;
8+
flex-direction: column;
9+
align-items: center;
10+
padding-top: 60px;
11+
`;
12+
13+
const Form = styled.form`
14+
margin-top: 20px;
15+
width: 100%;
16+
max-width: 400px;
17+
display: flex;
18+
19+
input {
20+
flex: 1;
21+
height: 55px;
22+
padding: 0 20px;
23+
background: #fff;
24+
border: 0;
25+
font-size: 18px;
26+
color: #444;
27+
border-radius: 3px;
28+
}
29+
30+
button {
31+
height: 55px;
32+
padding: 0 20px;
33+
margin-left: 10px;
34+
background: #63f5b8;
35+
color: #fff;
36+
border: 0;
37+
font-size: 20px;
38+
font-weight: bold;
39+
border-radius: 3px;
40+
41+
&:hover {
42+
background: #57d89f;
43+
}
44+
}
45+
`;
46+
47+
const Main = () => (
48+
<Container>
49+
<img src={Logo} alt="Github Compare" />
50+
51+
<Form>
52+
<input type="text" placeholder="usuário/repositório" />
53+
<button type="submit">OK</button>
54+
</Form>
55+
</Container>
56+
);
57+
58+
export default Main;

src/styles/global.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const GlobalStyle = createGlobalStyle`
55
margin: 0;
66
padding: 0;
77
box-sizing: border-box;
8+
outline: 0;
89
}
910
1011
body {

0 commit comments

Comments
 (0)