bpk-component-pagination

5.1.2 • Public • Published

bpk-component-pagination

Backpack pagination component.

Installation

npm install bpk-component-pagination --save-dev

Usage

import React from 'react';
import BpkPagination from 'bpk-component-pagination';

const Pagination = () => (
  <BpkPagination
    pageCount={20}
    selectedPageIndex={0}
    onPageChange={pageIndex => alert(`page ${pageIndex + 1}`)}
    previousLabel="previous"
    nextLabel="next"
    visibleRange={3}
    pageLabel={(page, isSelected) => `page ${page}`}
  />
);

Props

Property PropType Required Default Value
pageCount number true -
selectedPageIndex number true -
previousLabel string true -
nextLabel string true -
paginationLabel string true -
pageLabel func true -
onPageChange func false null
visibleRange number false 3
className string false null

Theme Props

  • buttonSecondaryTextColor
  • buttonSecondaryHoverTextColor
  • buttonSecondaryActiveTextColor
  • buttonSecondaryBorderColor
  • buttonSecondaryHoverBorderColor
  • buttonSecondaryActiveBorderColor
  • buttonSecondaryBackgroundColor
  • buttonSecondaryHoverBackgroundColor
  • buttonSecondaryActiveBackgroundColor
  • paginationNudgerActiveColor
  • paginationNudgerColor
  • paginationNudgerHoverColor
  • paginationSelectedBackgroundColor

/bpk-component-pagination/

    Package Sidebar

    Install

    npm i bpk-component-pagination

    Weekly Downloads

    2

    Version

    5.1.2

    License

    Apache-2.0

    Unpacked Size

    52.5 kB

    Total Files

    26

    Last publish

    Collaborators

    • ojcurt
    • frugoman
    • gert-jan.vercauteren
    • skyscanner-koalasquad
    • anambl
    • shaundon