Checkboxes sync enabled

This commit is contained in:
Leoh 2021-10-15 09:41:43 +05:30
parent 51e5f13203
commit a60eade0ae
3 changed files with 56 additions and 44 deletions

View file

@ -1,9 +1,9 @@
import * as React from "react";
function TodoItem(props: any) {
function TodoItem(props: any) {
return (
<div className="todo-item" key = {props.key}>
<input type="checkbox" />
<div className="todo-item" id={props.id}>
<input type="checkbox" id={props.id} onChange={props.onChange} checked={props.completed}/>
<p>{props.task.text}</p>
</div>
)