0.0.6 • Published 6 years ago

react-rayr-pagination v0.0.6

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

Description

the pagination plugin for react.

    1.support jumping to a page where you want to (when the number of pages is more than 5)

    2.can change the counts that each page show

    3.can choose different size of the pagination

Install

npm install react-rayr-pagination --save

Params

paramtypedescriptdefault
countNumberthe sum of data (required)null
currentPageNumbercurrent page1
perPageNumberthe counts that each page shows10
sizeStringthe size of the pagination(can receive one of 'lg','md','sm')md
classNameStringadd custom styles for the pagination
onChangeFunctioncallback, the param is the page which you have clicked

Use Demo

import {RayrPagination} from 'react-rayr-pagination';

<RayrPagination className={'yourClassName'} 
   count={this.state.count}
   currentPage={this.state.currentPage}
   perPage={this.state.perPage}
   size={'sm'}
   onChange={(page) => {
       this.setState({currentPage:page});
   }}
/>

   tips:don`t forget to import the css file

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago