React-pagination

react pagination component, simple use

Install

npm install react-pagination-component

Configuration

totalPage : (number) total page number

focusPage : (function) callback the current page number

Usage

var React = require('react');
var ReactDOM = require('react-dom');
var Paginate = require('./react-pagination-component.js');

var demo = document.getElementById('demo');
var p = document.getElementById('page-num');

function changePage(page){
    p.innerText = 'focus page : ' + page;
};

ReactDOM.render(
    <Paginate totalPage={100} focusPage={changePage} />,
    demo
);

GitHub