Commit 670fb5b9 authored by AFOC-1709091830\echou's avatar AFOC-1709091830\echou

modify readme

parent e5c6c022
...@@ -32,12 +32,18 @@ or ...@@ -32,12 +32,18 @@ or
import {PullToRefresh} from "react-js-pull-to-refresh"; import {PullToRefresh} from "react-js-pull-to-refresh";
``` ```
#### import default content (optional)
```js
import {PullDownContent, ReleaseContent, RefreshContent} from "react-js-pull-to-refresh";
```
#### Sample #### Sample
```js ```js
<PullToRefresh <PullToRefresh
pullDownContent={<div style={{backgroundColor: "grey", height: "200px", textAlign: "center"}}>Pull down to refresh</div>} pullDownContent={<PullDownContent />}
releaseContent={<div style={{backgroundColor: "green", height: "200px", textAlign: "center"}}>Release to refresh</div>} releaseContent={<ReleaseContent />}
refreshContent={<div style={{backgroundColor: "yellow", height: "200px", textAlign: "center"}}>Refreshing</div>} refreshContent={<RefreshContent />}
pullDownThreshold={200} pullDownThreshold={200}
onRefresh={this.onRefresh} onRefresh={this.onRefresh}
> >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment