@yana4961/react-todo-list
v2.1.0
Published
ToDo list react component
Downloads
5
Readme
@yana4961/react-todo-list
ToDo list react component
Install
npm install --save @yana4961/react-todo-list
Usage
import React, { Component } from 'react'
import TodoList from '@yana4961/react-todo-list'
import '@yana4961/react-todo-list/dist/index.css'
class Example extends Component {
const todoData = [
{ label: 'one', id: 1, done: false, important: true },
{ label: 'two', id: 2, done: false, important: false },
{ label: 'three', id: 3, done: true, important: true },
];
const yourHandleFunction = (updatedItems) => {
console.log(updatedItems);
}
render() {
return <TodoList todoData={todoData} handleMouseLeave={yourHandleFunction} />
}
}