-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jones Warren
committed
May 24, 2019
0 parents
commit 41425e9
Showing
14 changed files
with
11,539 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src | ||
.babelrc | ||
.gitignore | ||
webpack.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# SnapShots | ||
|
||
a configurable turnplate in React | ||
|
||
 | ||
--- | ||
|
||
# react-loadmore | ||
|
||
``` | ||
$ npm install --save react-loadmore | ||
``` | ||
|
||
# how to use | ||
``` | ||
import ReactLoadMore from "react-loadmore"; | ||
<ReactLoadMore | ||
onBottom={this.loadMore.bind(this)} | ||
fetching={fetching} | ||
hasMore={hasMore} | ||
NoResult={NoResult} | ||
Footer={null} | ||
> | ||
{dataList.map((item,index) => { | ||
return ( | ||
<div style={{ height: "35vw", position: "relative" }} key={index}> | ||
<img | ||
src={item.extra.thumbnail_pic} | ||
style={{ | ||
width: "40vw", | ||
height: "25w", | ||
borderRadius:'3vw', | ||
position: "absolute", | ||
top: "2vw", | ||
left: "2vw" | ||
}} | ||
/> | ||
<span style={{ fontSize: "4vw", position: "absolute", | ||
top: "5vw", | ||
fontWeight:'bold', | ||
left: "46vw"}}>{item.title}</span> | ||
</div> | ||
); | ||
})} | ||
</ReactLoadMore> | ||
``` | ||
you can also fork the code and `npm start` to run the example. | ||
|
||
## props | ||
|
||
| params | type | desc | necessary| | ||
| -------- | -----: | :----: | | ||
| onBottom | func | when the user scroll to the bottom| true| | ||
| fetching | bool | isFetchingData| true| | ||
| fetching | bool | isFetchingData| true| | ||
| hasMore | bool | has more data| true| | ||
| NoResult | func | return the ui dom of no result | false| | ||
| Footer | func | return the ui dom loading Footer | false| | ||
|
||
|
||
## more | ||
you can fork and check the example code to see the fully complishment. | ||
|
||
**If you have any of ideas,don't forget to leave an issue! And also star haha** | ||
|
||
## License | ||
|
||
ISC |
Oops, something went wrong.