0.1.1 • Published 8 years ago

react-dogear v0.1.1

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

react-dogear ·

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