/react-touch-view

Primary LanguageJavaScriptMIT LicenseMIT

touch-view

$ npm i xiaoyann/react-touch-view --save
import TouchView from 'react-touch-view';

class Example extends Component {
    ...
    render() {
        return (
            <TouchView
                onTap={...}
                onLongTap={...}
            >
                <div>Touch Me</div>
            </TouchView>    
        );
    }
}

Props

name type default
onTap function --
onLongTap function --
moveThreshold number 10
longTapThreshold number 600