Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
R
react-pull-to-refresh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jason.yap
react-pull-to-refresh
Commits
2bf09d41
Commit
2bf09d41
authored
Jan 03, 2018
by
AFOC-1709091830\echou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify readme
parent
1a8635b4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
7 deletions
+34
-7
README.md
README.md
+34
-7
No files found.
README.md
View file @
2bf09d41
# react-js-pull-to-refresh
# react-js-pull-to-refresh
Pull to refresh on web
Pull to refresh with react
> Support all mobile(iOS, Android) and Desktop browser (Chrome, Safari, firefox, Opera, QQ, UC, ... etc)
[

](https://badge.fury.io/js/react-js-pull-to-refresh)
[

](https://badge.fury.io/js/react-js-pull-to-refresh)
[

](https://opensource.org/licenses/MIT)
[

](https://opensource.org/licenses/MIT)
...
@@ -14,11 +17,35 @@ or
...
@@ -14,11 +17,35 @@ or
`yarn add react-js-pull-to-refresh`
`yarn add react-js-pull-to-refresh`
## Props
## Props
-
pullDownContent: JSX.Element (Required)
|Name|Type|Required
-
releaseContent: JSX.Element (Required)
|:------:|:------:|:------:|
-
refreshContent: JSX.Element (Required)
|pullDownContent|JSX.Element|true|
-
pullDownThreshold: number (Required)
|releaseContent|JSX.Element|true|
-
onRefresh: () => Promise
<any>
(Required)
|refreshContent|JSX.Element|true|
|pullDownThreshold|number|true|
|onRefresh|Promise|true|
## Usage
## Usage
See examples folder
#### import PullToRefresh
```
js
import
{
PullToRefresh
}
from
"
react-js-pull-to-refresh
"
;
```
#### Sample
```
js
<
PullToRefresh
pullDownContent
=
{
<
div
style
=
{{
backgroundColor
:
"
grey
"
,
height
:
"
200px
"
,
textAlign
:
"
center
"
}}
>
Pull
down
to
refresh
<
/div>
}
releaseContent
=
{
<
div
style
=
{{
backgroundColor
:
"
green
"
,
height
:
"
200px
"
,
textAlign
:
"
center
"
}}
>
Release
to
refresh
<
/div>
}
refreshContent
=
{
<
div
style
=
{{
backgroundColor
:
"
yellow
"
,
height
:
"
200px
"
,
textAlign
:
"
center
"
}}
>
Refreshing
<
/div>
}
pullDownThreshold
=
{
200
}
onRefresh
=
{
this
.
onRefresh
}
>
<
div
style
=
{{
height
:
"
150vh
"
,
textAlign
:
"
center
"
}}
>
<
div
>
PullToRefresh
<
/div
>
<
/div
>
<
/PullToRefresh>
```
## Contributing
`npm run dev`
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment