File tree Expand file tree Collapse file tree 4 files changed +53
-10
lines changed Expand file tree Collapse file tree 4 files changed +53
-10
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import { Types } from '../../store/reducer/example-reducer';
55import Note from '../../models/Note' ;
66import ItemList from '../ItemList'
77
8+ import './styles.css'
9+
810export 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 >
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { useDispatch } from 'react-redux' ;
33import { Types } from '../../store/reducer/example-reducer' ;
4- // import { Container } from './styles';
4+ import './styles.css ' ;
55
66export 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}
You can’t perform that action at this time.
0 commit comments