beornborn / react-simplest-pagination

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-simplest-pagination

This is simple pagination component for react.

How it looks like

Installation

npm install --save react-simplest-pagination

Example

this is an example of usage

import Pagination from 'react-simplest-pagination'
...
<Pagination
  currentPage={state.page}
  totalPages={totalPages}
  onPageClick={this.setPage} />

Properties

property type default description
currentPage int current page number
totalPages int total pages amount
onPageClick function callback on page click: onClick={(num) => onPageClick(num)}
containerStyle object react style object like: {fontSize: 11}
buttonStyle object react style object like: {fontSize: 11}

The best documentation

https://github.com/beornborn/react-simplest-pagination/blob/master/src/index.js

About

License:MIT License


Languages

Language:JavaScript 100.0%