@@ -38,15 +38,15 @@ function handleToggleTodo(id: number, value: boolean): void {
38
38
</script >
39
39
40
40
<template >
41
- <div class =" card" >
41
+ <div class =" card border-2 " >
42
42
<p v-if =" type === 'isLoading'" class =" state-text" >Loading...</p >
43
43
<p v-else-if =" type === 'error'" class =" state-text" >{{ error }}</p >
44
44
<div v-else-if =" type === 'todos'" class =" todo-list" >
45
- <div bind:offsetHeight = " {listDivScrollHeight} " >
45
+ <div >
46
46
<p v-if =" props.todos.length === 0" class =" state-text" >No todos yet</p >
47
47
<ul >
48
48
<li v-for =" todo in props.todos" :key =" todo.id" >
49
- <div class =" bg-gray-300 " :class =" todo.completed ? 'completed' : ''" >
49
+ <div class =" card " :class =" todo.completed ? 'completed' : ''" >
50
50
<label >
51
51
<input
52
52
type =" checkbox"
@@ -72,18 +72,12 @@ function handleToggleTodo(id: number, value: boolean): void {
72
72
</ul >
73
73
</div >
74
74
</div >
75
- <!-- .add-todo-form {
76
- padding: 15px;
77
- background-color: #303030;
78
- display: flex;
79
- flex-wrap: wrap;
80
- border-top: 1px solid #4b4b4b;
81
- } -->
82
- <form
83
- class =" card p-[15px] flex flex-wrap border-t border-gray-50"
84
- @submit.prevent =" handleAddTodo"
85
- >
86
- <input class =" bg-gray-300" placeholder =" New Todo" v-model =" inputText" />
75
+ <form class =" card p-[15px] flex flex-wrap" @submit.prevent =" handleAddTodo" >
76
+ <input
77
+ class =" bg-gray-50 focus:outline-none focus:ring-2 focus:ring-[#12b488]"
78
+ placeholder =" New Todo"
79
+ v-model =" inputText"
80
+ />
87
81
<button class =" btn" type =" submit" :disabled =" !inputText || disableAdding" >
88
82
Add
89
83
</button >
@@ -92,11 +86,6 @@ function handleToggleTodo(id: number, value: boolean): void {
92
86
</template >
93
87
94
88
<style scoped>
95
- /* .todo-list-wrapper {
96
- background-color: #424242;
97
- border: 2px solid #4b4b4b;
98
- border-radius: 5px;
99
- } */
100
89
.state-text {
101
90
margin : 0 ;
102
91
padding : 15px ;
@@ -153,13 +142,12 @@ input[type="checkbox"] {
153
142
154
143
input {
155
144
flex : 1 ;
156
- border : 1px solid #4b4b4b ;
157
145
padding : 10px ;
158
- color : #fff ;
146
+ color : black ;
159
147
border-radius : 5px ;
160
148
margin-right : 10px ;
161
149
}
162
- /* .add-todo-button:disabled {
163
- background-color: #42b883aa ;
164
- } */
150
+ input :focus {
151
+ border : none ;
152
+ }
165
153
</style >
0 commit comments