mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-16 18:46:57 +02:00
v2: prepare to move
This commit is contained in:
parent
dc7ef96849
commit
45736200b0
172 changed files with 0 additions and 0 deletions
29
v2/website/components/Todo/TodoList.js
Normal file
29
v2/website/components/Todo/TodoList.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
import React from 'react';
|
||||
import TodoItem from './TodoItem';
|
||||
|
||||
export default function TodoList(props) {
|
||||
const todoItems = props.todos.map(todo => (
|
||||
<TodoItem
|
||||
key={todo.id}
|
||||
todo={todo}
|
||||
onToggle={() => {
|
||||
props.onToggle(todo);
|
||||
}}
|
||||
onDestroy={() => {
|
||||
props.onDestroy(todo);
|
||||
}}
|
||||
onEdit={() => {
|
||||
props.onEdit(todo);
|
||||
}}
|
||||
editing={props.editing(todo)}
|
||||
onSave={text => {
|
||||
props.onSave(todo, text);
|
||||
}}
|
||||
onCancel={() => {
|
||||
props.onCancel();
|
||||
}}
|
||||
/>
|
||||
));
|
||||
|
||||
return <div>{todoItems}</div>;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue