File tree Expand file tree Collapse file tree 8 files changed +25
-30
lines changed
Expand file tree Collapse file tree 8 files changed +25
-30
lines changed Original file line number Diff line number Diff line change 11import React , { FC , useState } from 'react' ;
22
3+ import Button from '~/components/Button' ;
34import SearchRepository from '~/components/SearchRepository' ;
45import Layout from '~/Layout' ;
56
6- import { Container , ButtonGroup , NextButton } from './styles' ;
7+ import { Container } from './styles' ;
8+ import { ButtonGroup } from '~/styles/button' ;
79
810const Battlefield : FC = ( ) => {
911 const [ disabled , setDisabled ] = useState ( false ) ;
@@ -14,10 +16,10 @@ const Battlefield: FC = () => {
1416 < h1 > Select the battlefield repository</ h1 >
1517 < SearchRepository setDisabled = { setDisabled } />
1618 < ButtonGroup >
17- < NextButton to = "/" > Back</ NextButton >
18- < NextButton to = "/fighters" disabled = { disabled } >
19+ < Button to = "/" > Back</ Button >
20+ < Button to = "/fighters" disabled = { disabled } >
1921 Next
20- </ NextButton >
22+ </ Button >
2123 </ ButtonGroup >
2224 </ Container >
2325 </ Layout >
Original file line number Diff line number Diff line change 11import styled from 'styled-components' ;
22
3- import Button from '~/components/Button' ;
4-
53export const Container = styled . div `
64 display: flex;
75 flex-direction: column;
@@ -16,17 +14,3 @@ export const Container = styled.div`
1614 text-align: center;
1715 }
1816` ;
19-
20- export const ButtonGroup = styled . div `
21- display: flex;
22- align-items: center;
23- justify-content: space-between;
24-
25- margin: 80px 0 40px;
26-
27- width: 100%;
28- ` ;
29-
30- export const NextButton = styled ( Button ) `
31- padding: 0 24px;
32- ` ;
Original file line number Diff line number Diff line change @@ -3,14 +3,14 @@ import React, { useContext } from 'react';
33import { useQuery } from '@apollo/react-hooks' ;
44import gql from 'graphql-tag' ;
55
6+ import Button from '~/components/Button' ;
67import Fighter from '~/components/Fighter' ;
78import Layout from '~/Layout' ;
89
910import RepositoryContext , { PullRequest } from '~/contexts/RepositoryContext' ;
1011
11- import { ButtonGroup , NextButton } from '../battlefield/styles' ;
12-
1312import { Container } from './styles' ;
13+ import { ButtonGroup } from '~/styles/button' ;
1414
1515interface QueryData {
1616 repository : {
@@ -81,10 +81,10 @@ function Fighters() {
8181 ) ) }
8282 </ ul >
8383 < ButtonGroup >
84- < NextButton to = "/battlefield" > Back</ NextButton >
85- < NextButton to = "/result" disabled = { ButtonIsDisabled } >
84+ < Button to = "/battlefield" > Back</ Button >
85+ < Button to = "/result" disabled = { ButtonIsDisabled } >
8686 Next
87- </ NextButton >
87+ </ Button >
8888 </ ButtonGroup >
8989 </ Container >
9090 </ Layout >
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ export const Container = styled.div`
55 flex-direction: column;
66 align-items: center;
77
8- padding: 24px;
98 max-width: 829px;
109 margin: 0 auto;
1110
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import Home from '~/components/sections/Home';
44import Layout from '~/Layout' ;
55
66const IndexPage : FC = ( ) => (
7- < Layout >
7+ < Layout title = "Home" >
88 < Home />
99 </ Layout >
1010) ;
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ export const Header = styled.header`
88 justify-content: space-between;
99
1010 width: 100%;
11- max-width: 1170px;
1211
1312 div {
1413 margin: 32px 0;
Original file line number Diff line number Diff line change 1- import { css } from 'styled-components' ;
1+ import styled , { css } from 'styled-components' ;
22
33export interface ButtonProps {
44 secundary ?: boolean ;
@@ -64,3 +64,13 @@ export default css<ButtonProps>`
6464 box-shadow: none;
6565 ` } ;
6666` ;
67+
68+ export const ButtonGroup = styled . div `
69+ display: flex;
70+ align-items: center;
71+ justify-content: space-between;
72+
73+ margin: 80px 0 40px;
74+
75+ width: 100%;
76+ ` ;
Original file line number Diff line number Diff line change @@ -57,8 +57,9 @@ export default createGlobalStyle`
5757 position: relative;
5858
5959 margin: 0 auto;
60+ padding: 0 32px;
6061
61- max-width: 1440 ;
62+ max-width: 1234px ;
6263 min-height: 100%;
6364 }
6465
You can’t perform that action at this time.
0 commit comments