Package Exports
- react-swipeable
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-swipeable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Swipeable
Install
npm install react-swipeableUse
var Swipeable = require('react-swipeable')
var SampleComponent = React.createClass({
render: function () {
return (
<Swipeable
onSwipingUp={this.swipingUp}
onSwipingRight={this.swipingRight}
onSwipingDown={this.swipingDown}
onSwipingLeft={this.swipingLeft}
onSwiped={this.handleSwipeAction}>
<div>
This element can be swiped
</div>
</Swipeable>
)
}
})Props
None of the props are required.
onSwipingUp, onSwipingRight, onSwipingDown, onSwipingLeft calls back with the event
as well as the absolute delta of where the swipe started and where it's currently at.
onSwiped calls back with the event and the absolute of the X and Y.
delta is the amount of px before we start firing events. The default value is 10.
onSwiped: React.PropTypes.func,
onSwipingUp: React.PropTypes.func,
onSwipingRight: React.PropTypes.func,
onSwipingDown: React.PropTypes.func,
onSwipingLeft: React.PropTypes.func,
delta: React.PropTypes.numberLicense
MIT