rw-reactstrap-paginator
v1.0.2
Published
a functional, controlled, pagination component for use with reactstrap
Downloads
2
Readme
rw-reactstrap-paginator
a functional, controlled, pagination component for use with reactstrap
View it in action here:
Install
npm install --save rw-reactstrap-paginator
Usage
import React, { Component } from 'react'
import Paginator from 'rw-reactstrap-paginator'
class Example extends Component {
state = {
curPage: 1,
itemsTotal: 1000,
itemsPerPage: 50
}
render () {
return (
<div>
<h1 className="text-center">rw-reactstrap-paginator</h1>
<hr/>
<Paginator
curPage={this.state.curPage}
itemsTotal={this.state.itemsTotal}
itemsPerPage={this.state.itemsPerPage}
pagesToDisplay={5}
size="lg"
onChange={(newPage)=>{this.setState({curPage: newPage})}} />
</div>
)
}
}
License
MIT © RickeyWard