Skip to content

Commit bf9ea8a

Browse files
committed
Adicionando um style
1 parent 5f214bc commit bf9ea8a

File tree

4 files changed

+53
-10
lines changed

4 files changed

+53
-10
lines changed

src/components/ComponentList/index.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { Types } from '../../store/reducer/example-reducer';
55
import Note from '../../models/Note';
66
import ItemList from '../ItemList'
77

8+
import './styles.css'
9+
810
export default function ComponentList() {
911

1012
const qty = 20
@@ -23,13 +25,15 @@ export default function ComponentList() {
2325

2426
return (
2527
<>
26-
<textarea
27-
cols={100}
28-
rows={10}
29-
value={text}
30-
onChange={e => setText(e.target.value)}
31-
/>
32-
<button type="button" onClick={add}>ADD</button>
28+
<div className="content-add">
29+
<textarea
30+
cols={100}
31+
rows={10}
32+
value={text}
33+
onChange={e => setText(e.target.value)}
34+
/>
35+
<button type="button" onClick={add}>ADD</button>
36+
</div>
3337
<ul>
3438
{list.map(item => <li key={item.id}><ItemList item={item} /> </li>)}
3539
</ul>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.content-add {
2+
width: 100%;
3+
margin: 10px;
4+
display: flex;
5+
align-items: center;
6+
justify-content: center;
7+
}
8+
9+
.content-add textarea {
10+
padding: 10px;
11+
font-size: 18px;
12+
}
13+
14+
.content-add button {
15+
padding: 10px;
16+
margin: 10px;
17+
}
18+
19+
ul {
20+
width: 100%;
21+
margin: 30px;
22+
display: flex;
23+
align-items: center;
24+
justify-content: center;
25+
flex-direction: column;
26+
}
27+
28+
ul li {
29+
margin: 10px;
30+
padding: 30px;
31+
height: 30px;
32+
display: flex;
33+
align-items: center;
34+
justify-content: center;
35+
36+
border: 1px solid #717180;
37+
border-radius: 8px;
38+
}

src/components/ItemList/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { useDispatch } from 'react-redux';
33
import { Types } from '../../store/reducer/example-reducer';
4-
// import { Container } from './styles';
4+
import './styles.css';
55

66
export default function ItemList({ item }) {
77

@@ -14,8 +14,9 @@ export default function ItemList({ item }) {
1414

1515
return (
1616
<span>
17-
{item.text} - {item.createAt}
18-
<button type="button" onClick={remove}>DELETE</button>
17+
<div>{item.text}</div>
18+
<small>{item.createAt}</small>
19+
<button type="button" onClick={remove} className="trach">DEL</button>
1920
</span>
2021
);
2122
}

src/components/ItemList/styles.css

Whitespace-only changes.

0 commit comments

Comments
 (0)