pagination-material-ui

1.0.7 • Public • Published

Pagination Component for material-ui

Usage

npm install --save pagination-material-ui

or

yarn add pagination-material-ui
import React, { Component } from 'react';
import { render } from 'react-dom';
import Pagination from 'pagination-material-ui'

class PaginationExample extends Component {
  render() {
    return (
      <Pagination total={100} perPage={10} onChange={this.onChange.bind(this)}/>
    )
  }
  
  onChange(currentPage, perPage) {
    // Do some pagination thing here
  }
}

render(<PaginationExample/>, document.getElementById('app'));

Available Props

total - Total rows count. Type: number - required
perPage - Show rows count on per page. Type: number - required
onChange - Callback for page change Type: function required

  @currentPage
  @perPage	

texts - Localization text Type: object

{
  page: 'Page: ',
  perPage: 'Per Page: ',
  showing: 'Showing {total} of {from} to {to}'
}

Readme

Keywords

none

Package Sidebar

Install

npm i pagination-material-ui

Weekly Downloads

0

Version

1.0.7

License

MIT license

Last publish

Collaborators

  • realendigo