pull-to-refresh-react
Pull To Refresh for Progressive Web Application (only Mobile) React JS
Install
npm i pull-to-refresh-react
Link Demo (Turn on mobile mode
)
NPM
Github
Usage
import React Component from 'react' import PullToRefresh from "pull-to-refresh-react"; { return resolve reject ; ; } { ; } { return <PullToRefresh = = > <div = > <div>Nguyen Manh Cuong - CuongStf</div> <button = = > Event Disabled when refreshing </button> </div> </PullToRefresh> ; }
Prop
Prop | Type | Default | Description |
---|---|---|---|
onRefresh | async function (required) |
- | Function happend when onRefresh |
textError | string (optional) |
Error |
Text display when error |
textStart | string (optional) |
Start |
Text display when start touch |
textReady | string (optional) |
Ready |
Text display when ready onRefresh |
textRefresh | string (optional) |
Refresh |
Text display when refreshing |
options | object (optional) |
{ pullDownHeight: 60 } |
{ pullDownHeight: height of Pull Down } |
Resource
Inspired from vue-pull-refresh
License
MIT © CuongStf