import { SyntheticEvent } from "react" ; export function prevDefault < E extends SyntheticEvent | Event > ( callback ) { return function ( evt ) { evt . preventDefault ( ) ; evt . stopPropagation ( ) ; return callback ( evt ) ; } ; } export function stopPropagation ( evt ) { evt . stopPropagation ( ) ; }