import React , { FC } from "react" ; import { Props , defaultData } from "./types" ; const TodoSettings = ( { data = defaultData , setData } ) => ( < div className = "SearchSettings" > < label > Tasks to show < input type = "number" min = "0" onChange = { ( event ) => setData ( { ... data , show : Number ( event . target . value ) } ) } placeholder = "Number of todo items to show" value = { data . show } / > < /label> < /div>); export default TodoSettings ;