import * as React from 'react' ; interface ProductFilterItemProps { item : string ; onChange ? ( value ) : void ; selected ? : boolean ; } const ProductFilterItem = ( { children , item , onChange , selected = false , } ) => ( < div className = "no-wrap" > < label > < input type = "checkbox" onChange = { onChange ? ( e ) => onChange ( e . target . name ) : undefined } checked = { onChange ? selected : undefined } name = { item } / > { ' ' } < span > { children } < /span> < /label> < /div>); export default ProductFilterItem ;