+ {/* eslint-disable jsx-a11y/label-has-associated-control */}
+
+ {
+ handleUpdateTodo({ ...todo, completed: !todo.completed });
+ }}
+ />
+
+
+ {selectedTodo ? (
+
+ ) : (
+
{
+ setSelectedTodo(todo);
+ }}
+ >
+ {title.trim()}
+
+ )}
+ {!selectedTodo && (
+
handleDeleteTodo(id)}
+ >
+ ×
+
+ )}
+
+
+
+ );
+ },
+);
diff --git a/src/components/Todo/TodoList/TodoList.tsx b/src/components/Todo/TodoList/TodoList.tsx
new file mode 100644
index 0000000000..5d4367f367
--- /dev/null
+++ b/src/components/Todo/TodoList/TodoList.tsx
@@ -0,0 +1,56 @@
+import React, { FC, useContext, useRef } from 'react';
+import { Todo } from '../../../types/Todo';
+import { TodoItem } from '../TodoItem/TodoItem';
+import { TodosContext } from '../../../context/TodoContext';
+import { CSSTransition, TransitionGroup } from 'react-transition-group';
+
+interface TodoListProps {
+ todos: Todo[];
+}
+
+export const TodoList: FC