File tree Expand file tree Collapse file tree 3 files changed +44
-30
lines changed Expand file tree Collapse file tree 3 files changed +44
-30
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import Footer from './components/Footer' ;
3
- import Header from './components/Header' ;
4
- import Navbar from './components/Navbar' ;
5
- import TodoList from './components/TodoList' ;
2
+ // import Footer from './components/Footer';
3
+ // import Header from './components/Header';
4
+ // import Navbar from './components/Navbar';
5
+ // import TodoList from './components/TodoList';
6
+ import Modal from './components/ui/Modal' ;
6
7
7
8
export default function App ( ) {
8
9
return (
9
10
< div className = "grid place-items-center bg-blue-100 h-screen px-6 font-sans" >
10
- < Navbar />
11
+ { /* <Navbar /> */ }
11
12
12
13
< div className = "w-full max-w-3xl shadow-lg rounded-lg p-6 bg-white" >
13
- < Header />
14
+ { /* <Header /> */ }
14
15
15
16
< hr className = "mt-4" />
16
17
17
- < TodoList />
18
+ < Modal />
19
+
20
+ { /* <TodoList /> */ }
18
21
19
22
< hr className = "mt-4" />
20
23
21
- < Footer />
24
+ { /* <Footer /> */ }
22
25
</ div >
23
26
</ div >
24
27
)
Original file line number Diff line number Diff line change @@ -27,28 +27,6 @@ export default function TodoList() {
27
27
) )
28
28
}
29
29
30
- // const filterByStatus = (todo) => {
31
- // const { status } = filters;
32
- // switch (status) {
33
- // case "Complete":
34
- // return todo.completed;
35
-
36
- // case "Incomplete":
37
- // return !todo.completed;
38
-
39
- // default:
40
- // return true;
41
- // }
42
- // };
43
-
44
- // const filterByColors = (todo) => {
45
- // const { colors } = filters;
46
- // if (colors.length > 0) {
47
- // return colors.includes(todo?.color);
48
- // }
49
- // return true;
50
- // };
51
-
52
30
return (
53
31
< div className = "mt-2 text-gray-700 text-sm max-h-[300px] overflow-y-auto" >
54
32
{ content }
Original file line number Diff line number Diff line change
1
+ import React from 'react'
2
+
3
+ const CancelSvg = ( ) => (
4
+ < >
5
+ < svg aria-hidden = "true" className = "w-5 h-5" fill = "currentColor" viewBox = "0 0 20 20" xmlns = "http://www.w3.org/2000/svg" > < path fillRule = "evenodd" d = "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clipRule = "evenodd" > </ path > </ svg >
6
+ < span className = "sr-only" > Close modal</ span >
7
+ </ >
8
+ )
9
+
10
+ export default function Modal ( ) {
11
+ return (
12
+ < div className = "bg-slate-800 bg-opacity-50 flex justify-center items-center absolute top-0 right-0 bottom-0 left-0" >
13
+ < div className = "relative p-4 w-full max-w-md h-full md:h-auto" >
14
+ < div className = "relative bg-white rounded-lg shadow dark:bg-gray-700" >
15
+ < button type = "button" className = "absolute top-3 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white" data-modal-toggle = "authentication-modal" >
16
+ < CancelSvg />
17
+ </ button >
18
+ < div className = "py-6 px-6 lg:px-8" >
19
+ < h3 className = "mb-4 text-xl font-medium text-gray-900 dark:text-white" > Update the todo</ h3 >
20
+ < form className = "space-y-6" >
21
+ < div >
22
+ { /* <label className="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300">Your email</label> */ }
23
+ < input type = "text" name = "email" className = "bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white" placeholder = "name@company.com" required />
24
+
25
+ < input className = 'px-4 py-2 bg-sky-500 rounded-full text-white' type = "submit" value = "update" />
26
+ </ div >
27
+ </ form >
28
+ </ div >
29
+ </ div >
30
+ </ div >
31
+ </ div >
32
+ )
33
+ }
You can’t perform that action at this time.
0 commit comments