import { SyntheticEvent } from 'react' ; export function stopPrevent < Event extends SyntheticEvent < any > > ( callback ) { return ( event ) => { event . preventDefault ( ) ; event . stopPropagation ( ) ; callback ( event ) ; } ; }