Skip to content

RoyalIcing/react-dogear

Repository files navigation

React Dog Ear · pagination component

Travis npm package Coveralls

Installation

npm i --save react-dogear

Usage

import DogEar from 'react-dogear' 

<DogEar>

  • current: The current page number (required)
  • total: The total number of possible pages (required)
  • maxItems: The total number of navigation items to show, 25 by default
  • leading: The number of sibling items before the current page, 3 by default
  • trailing: The number of sibling items after the current page, 6 by default
  • hrefForPage (number) -> string: Function returning a string given a page number (required)
  • itemPropsWhenCurrent: Props for the current page’s link, e.g. { className: 'current' } (required)
  • Item: The component to render each item, <a> by default. Gets passed prop href, {...linkPropsWhenCurrent} when current page

About

A nice pagination control

Resources

License

Stars

Watchers

Forks

Packages

No packages published