Skip to content

Commit 859ff8e

Browse files
committed
Fim da live 1
1 parent 980b09f commit 859ff8e

File tree

9 files changed

+92
-14
lines changed

9 files changed

+92
-14
lines changed

src/App.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
import React from 'react';
22

3+
import './styles/settings/colors.css';
34
import './styles/generic/reset.css';
4-
import Title from './components/Title';
5+
import './styles/elements/base.css';
6+
import MainTitle from './components/MainTitle';
7+
import MainTask from './components/MainTask';
58

69
const App = () => (
7-
<Title content="Todo" />
10+
<>
11+
<MainTitle content="Todo" />
12+
13+
<MainTask id="task1" content="Criar o title" />
14+
15+
<MainTask id="task2" content="Criar o title" />
16+
17+
<MainTask id="task3" content="Criar o title" />
18+
19+
<MainTask id="task4" content="Criar o title" />
20+
</>
821
);
922

1023
export default App;

src/components/MainTask/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from 'react';
2+
3+
import { Label, Checkbox } from './styles';
4+
5+
const MainTask = ({id, content}) => (
6+
<>
7+
<Checkbox id={id} />
8+
<Label for={id}>
9+
{content}
10+
</Label>
11+
</>
12+
);
13+
14+
export default MainTask;

src/components/MainTask/styles.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import styled from 'styled-components';
2+
3+
const Checkbox = styled.input.attrs({ type: "checkbox"})`
4+
display: none;
5+
`;
6+
7+
const Label = styled.label`
8+
display: flex;
9+
align-items: center;
10+
font-size: 22px;
11+
font-weight: 300;
12+
padding: 30px 20px;
13+
margin-bottom: 30px;
14+
15+
background-image: linear-gradient(270.67deg, rgba(255, 255, 255, 0) 0.13%, rgba(160, 163, 164, 0.483621) 18.84%, rgba(123, 127, 128, 0.671695) 39.1%, rgba(81, 86, 88, 0.885417) 75.46%, #3A4042 99.88%);
16+
17+
&:before {
18+
content: "";
19+
box-sizing: content-box;
20+
width: 40px;
21+
height: 40px;
22+
border-radius: 50%;
23+
border: 2px solid var(--color-first);
24+
margin-right: 15px;
25+
cursor: pointer;
26+
}
27+
28+
${Checkbox}:checked + &:before {
29+
background-color: var(--color-first);
30+
}
31+
`;
32+
33+
34+
35+
export { Label, Checkbox }

src/components/MainTitle/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react';
2+
3+
import { Title } from './styles';
4+
5+
const MainTitle = ({ content }) => (
6+
<Title>{content}</Title>
7+
);
8+
9+
export default MainTitle;

src/components/MainTitle/styles.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import styled from "styled-components";
2+
3+
const Title = styled.h1`
4+
font-size: 34px;
5+
text-align: center;
6+
font-weight: bold;
7+
margin-bottom: 20px;
8+
`
9+
10+
export { Title }

src/components/Title/index.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/components/Title/styles.css

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/styles/elements/base.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
body {
2+
padding-top: 30px;
3+
font-family: 'Comfortaa', sans-serif;
4+
color: var(--color-base);
5+
}

src/styles/settings/colors.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
:root {
2+
--color-base: #E5E5E5;
3+
--color-first: #F25A70;
4+
}

0 commit comments

Comments
 (0)