Skip to content

Commit ddfc128

Browse files
committed
Alterando os componentes de visualizar e editar antes de salvar
1 parent fa28a23 commit ddfc128

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/components/ComponentList/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
22
import { useSelector, useDispatch } from 'react-redux';
33
import marked from 'marked';
44
import { sanitize } from 'dompurify';
5-
import { MdDone, MdDvr, MdEdit } from 'react-icons/md';
5+
import { MdDone, MdVisibility, MdCode } from 'react-icons/md';
66

77
import { Types } from '../../store/reducer/example-reducer';
88

@@ -75,13 +75,13 @@ export default function ComponentList() {
7575
<MdDone width={24} />
7676
</button>
7777
<button type="button" onClick={preview}>
78-
{hide() ? <MdDvr width={24} /> : <MdEdit width={24} />}
78+
{hide() ? <MdVisibility width={24} /> : <MdCode width={24} />}
7979
</button>
8080
</div>
8181
</div>
8282
<div className="content-list">
83-
<ul>
84-
{list.map(item => <li key={item.id}><ItemList item={item} /> </li>)}
83+
<ul className="list">
84+
{list.map(item => <li className="item" key={item.id}><ItemList item={item} /> </li>)}
8585
</ul>
8686
</div>
8787
</>

src/components/ComponentList/styles.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@
5959
flex-direction: column;
6060
}
6161

62-
ul {
62+
.list {
6363
width: 80%;
6464
padding: 30px;
6565
}
6666

67-
ul li {
67+
.list .item {
6868
margin: 20px;
6969
padding: 20px;
7070
min-height: 200px;

src/styles/global.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,9 @@ body {
1818

1919
ul {
2020
list-style: none;
21+
}
22+
23+
li, ol {
24+
padding-left: 10px;
25+
line-height: 24px;
2126
}

0 commit comments

Comments
 (0)