Skip to content

Commit 224ffcb

Browse files
committed
Some styles added
1 parent d2830b4 commit 224ffcb

File tree

4 files changed

+25
-7
lines changed

4 files changed

+25
-7
lines changed

src/components/TaskForm/TaskForm.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
form {
22
padding: 1rem;
33

4-
background: rgb(236, 236, 236);
4+
background: rgb(255, 255, 255);
5+
box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
56

67
display: flex;
78
flex-direction: column;
@@ -10,5 +11,8 @@ form {
1011
}
1112

1213
.form-control {
13-
margin: 10px 0;
14+
margin-bottom: 10px;
15+
padding: 1rem;
16+
outline: none;
17+
border: 1px solid rgba(0, 0, 0, 0.329);
1418
}

src/components/TaskForm/TaskForm.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export const TaskForm = (props: any) => {
2222

2323
return (
2424
<form onSubmit={(e) => handleSubmit(e)}>
25+
<h2>Add Task</h2>
26+
2527
<input
2628
type="text"
2729
name="title"
@@ -38,7 +40,16 @@ export const TaskForm = (props: any) => {
3840
onChange={(e) => handleInputChange(e)}
3941
/>
4042

41-
<button type="submit" >Save Task</button>
43+
<select
44+
name="done"
45+
className="form-control"
46+
onChange={handleInputChange}
47+
>
48+
<option value={`${true}`}>Hecha</option>
49+
<option value={`${false}`}>Pendiente</option>
50+
</select>
51+
52+
<button className="form-control" type="submit" >Save Task</button>
4253
</form>
4354
)
4455
}

src/components/TasksList/TaskList.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.tasks-list {
2+
margin-top: 20px;
3+
}
4+
15
.tasks-container {
26
width: 100%;
37

@@ -30,7 +34,6 @@
3034

3135
.card__status {
3236
padding: 8px;
33-
border-radius: 10px;
3437
}
3538

3639
.card__status.success {

src/components/TasksList/TasksList.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const TasksList = (props: any) => {
66

77

88
return (
9-
<div>
9+
<div className="tasks-list">
1010
<h2>TasksList</h2>
1111
<div className="tasks-container">
1212
{
@@ -15,9 +15,9 @@ export const TasksList = (props: any) => {
1515
<h3 className="card__title" >{task.title}</h3>
1616
<p className="card__description">{task.description}</p>
1717
<span
18-
className={`card__status ${task.done ? 'success' : 'pending'}`}
18+
className={`card__status ${task.done == 'true' ? 'success' : 'pending'}`}
1919
>
20-
{ task.done ? 'Hecha' : 'Pendiente'}
20+
{ task.done == 'true' ? 'Hecha' : 'Pendiente'}
2121
</span>
2222
</div>
2323
))

0 commit comments

Comments
 (0)