pagination-react

1.1.6 • Public • Published

pagination for react

!(preview)[preview.gif]

install

npm install --save-dev pagination-react style-loader css-loader

webpack.config.js

// add loader
{
    test: /\.css$/,
    loader: "style-loader!css-loader"
}

import

import Pagination from 'pagination-react'

use

<Pagination 
    count={16}
    groupCount={5}
    selectedCount={1}
    setUpdate={handle => this.updatePagination = handle}
    callback={index => console.log(index)}/>

count: size

groupCount: every group show how many items

selectedCount: current index, is optional

setUpdate: update index, is optional

callback: an arg with index

Readme

Keywords

Package Sidebar

Install

npm i pagination-react

Weekly Downloads

3

Version

1.1.6

License

MIT

Last publish

Collaborators

  • zweizhao