node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

rc-pager

rc-pager

react pager component

NPM version build status Test coverage gemnasium deps node version npm download

install

rc-pager

Usage

var Pager = require('rc-pager');
React.renderComponent(
  <Pager total={10} current={5}/>,
  document.getElementById('p1')
);

Development

npm install
npm start

Example

http://localhost:8000/examples/

online example:

http://react-component.github.io/pager/build/examples/index.html

API

total Number

  • total page

current Number

  • current page

previousLabel String|Element

  • previous page label, also can be a React Component

nextLabel String|Element

  • next page label, also can be a React Component

onSkipTo(page) Function

  • The callback when the page skip

Test Case

http://localhost:8000/tests/runner.html?coverage

Coverage

http://localhost:8000/node_modules/rc-server/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8000/tests/runner.html?coverage

License

rc-pager is released under the MIT license.