Package Exports
- react-repeatable
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-repeatable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-repeatable

A press and hold wrapper component that can trigger action multiple times while holding down a clickable element.
Demo: https://cheton.github.io/react-repeatable
Installation
npm install --save react-repeatable
Usage
<Repeatable
enterDelay={500}
intervalDelay={50}
onPress{(event) => {
// Callback fired when the mousedown or touchstart event is triggered.
}}
onRelease={(event) => {
// Callback fired when the mouseup, touchcancel, or touchend event is triggered.
}}
>
<button
type="button"
onClick={(event) => {
// The click action will be triggered multiple times.
}}
>
Press Me
</button>
</Repeatable>
API
Properties
Name | Type | Default | Description |
---|---|---|---|
enterDelay | Number | 500 | The time (in milliseconds) to wait before the action is being triggered. |
intervalDelay | Number | 50 | The intervals (in milliseconds) on how often to trigger the action. |
onPress | Function | Callback fired when the mousedown or touchstart event is triggered. | |
onRelease | Function | Callback fired when the mouseup, touchcancel, or touchend event is triggered. |
License
MIT