1.0.3 • Published 6 years ago

reactnator v1.0.3

Weekly downloads
21
License
MIT
Repository
github
Last release
6 years ago

Reactnator

The easier way to paginate things

Installing

In your project folder, type on console

yarn add reactnator

or you can use NPM aswell

npm i reactnator

Dependencies

  • React
  • ReactDOM
  • Recompose
  • scroll-to-target

Api Reference

PropertyTypeDefaultDescription
totalnumber1total of pages
currentPagenumber1page number that will receive active class
onChangefunctionpage => console.log(page)onChange handler, that receive page with new current page value
scrollToobjectfalseallows scroll to some point on click, this object receive these following values { selector: #valid-dom-element, speed: 1, offset: 0}
typestringbuttonthis prop will decide how type of pagination you want; button, link or history (not yet)
linkstring#URL who reactnator will add pagination's number. Example with default values: #1
pageNumberStylestringreactnator__page-numberoptional style to page numbers
activePageStylestringreactnator__page-number--activeoptional style to active page number

License

Licensed under the MIT license.