1.0.2 • Published 6 years ago

rw-reactstrap-paginator v1.0.2

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

rw-reactstrap-paginator

a functional, controlled, pagination component for use with reactstrap

View it in action here:

live demo

NPM JavaScript Style Guide

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

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago