import { ChangeEvent } from 'react' ; import { EventModel } from 'proton-shared/lib/interfaces/calendar' ; const createHandlers = ( { model , setModel , field , } ) => ( { native : { value : model [ field ] , onChange : ( event ) => setModel ( { ... model , [ field ] : event . currentTarget . value } ) , } , model : { value : model [ field ] , onChange : ( value ) => setModel ( { ... model , [ field ] : value } ) , } , } ) ; export default createHandlers ;