0.1.0 • Published 7 years ago

react-easy-paginate v0.1.0

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

React-Easy-Paginate

React component to render a pagination.

Installation

The easises way to use React-Easy-Paginate is ti install from npm.

npm install react-easy-paginate --save

At this point you can import react-easy-paginate and simple styles in your application :

import ReactEasyPaginate from 'react-easy-paginate'

import `react-easy-paginate/dist/react-easy-paginate.css`

Props

NameTypeDefault PropsDescription
pageTotalNumberundefinedRequired. The total number of pages
rangeDisplayedNumberundefinedRequired. The range of page displayed
startPageNumber1From which page starts
onClickFunctionundefinedThe method to call when click on next/previous page, return number of current page
nextLabelnode<a>Next</a>Label for the next button
previousLabelnode<a>Previous</a>Label for the previous button
activeClassStringactiveThe className for the active page
labelDisabledClassStringdisabledThe className for the disabled label

Example

To run example locally, clone this repo then run:

//if you do not install the module, if installed, proceed to the next step

npm install

make run-example

After open localhost:8000 (or what port you using in process.env.PORT) in a browser.

License

MIT Licensed.