diff --git a/src/App.js b/src/App.js
index e358583..7ee487a 100644
--- a/src/App.js
+++ b/src/App.js
@@ -1,10 +1,12 @@
import React from 'react';
import logo from './logo.svg';
import './App.css';
+import TodoList from './containers/TodoList/TodoList';
function App() {
return (
+
);
}
diff --git a/src/components/Todo/Todo.js b/src/components/Todo/Todo.js
index e69de29..fcb1391 100644
--- a/src/components/Todo/Todo.js
+++ b/src/components/Todo/Todo.js
@@ -0,0 +1,15 @@
+import React from 'react';
+import './Todo.css';
+
+const Todo = props => {
+ return (
+
+
+ {props.title}
+
+ {props.done &&
✓
}
+
+ )
+}
+
+export default Todo;
\ No newline at end of file
diff --git a/src/components/TodoDetail/TodoDetail.js b/src/components/TodoDetail/TodoDetail.js
index e69de29..6cfc74f 100644
--- a/src/components/TodoDetail/TodoDetail.js
+++ b/src/components/TodoDetail/TodoDetail.js
@@ -0,0 +1,29 @@
+import React from 'react';
+
+import './TodoDetail.css';
+
+const TodoDetail = (props) => {
+ return (
+
+
+
+ Name:
+
+
+ {props.title}
+
+
+
+
+
+ Content:
+
+
+ {props.content}
+
+
+
+ );
+};
+
+export default TodoDetail;
\ No newline at end of file
diff --git a/src/containers/TodoList/NewTodo/NewTodo.js b/src/containers/TodoList/NewTodo/NewTodo.js
index e69de29..6217166 100644
--- a/src/containers/TodoList/NewTodo/NewTodo.js
+++ b/src/containers/TodoList/NewTodo/NewTodo.js
@@ -0,0 +1,26 @@
+import React, { Component } from 'react';
+import './NewTodo.css';
+
+class NewTodo extends Component {
+ state = {
+ title: '',
+ content: '',
+ submitted: false,
+ }
+ render() {
+ return (
+
+
Add a Todo
+
+ this.setState({ title: event.target.value })} />
+
+
+ );
+ }
+}
+
+export default NewTodo;
\ No newline at end of file
diff --git a/src/containers/TodoList/TodoList.js b/src/containers/TodoList/TodoList.js
index e69de29..33b1f4d 100644
--- a/src/containers/TodoList/TodoList.js
+++ b/src/containers/TodoList/TodoList.js
@@ -0,0 +1,48 @@
+import React, { Component } from 'react';
+import Todo from '../../components/Todo/Todo';
+import TodoDetail from '../../components/TodoDetail/TodoDetail';
+import './TodoList.css';
+import './NewTodo/NewTodo.js';
+
+class TodoList extends Component {
+
+ state = {
+ todos: [
+ {id: 1, title: 'SWPP', content: 'take swpp class', done:true},
+ {id: 2, title: 'Movie', content: 'watch movie', done:false},
+ {id: 3, title: 'Dineer', content: 'eat dinner', done:false},
+ ],
+ selectedTodo: null,
+ }
+
+ clickTodoHandler = td => {
+ if (this.state.selectedTodo === td) {
+ this.setState( {selectedTodo: null});
+ } else {
+ this.setState ( {selectedTodo: td});
+ }
+ }
+
+ render() {
+ let todoDetail = null;
+ if (this.state.selectedTodo) {
+ todoDetail =
+ }
+
+ const todos = this.state.todos.map((td) => {
+ return ( this.clickTodoHandler(td)}>)
+ })
+
+
+ return (
+
+
{this.props.title}
+
{todos}
+ {todoDetail}
+
+
+ )
+ }
+}
+
+export default TodoList;
\ No newline at end of file