npm i --save react-dogear
import DogEar from 'react-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 prophref
,{...linkPropsWhenCurrent}
when current page