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

Readme

Keywords

none

Package Sidebar

Install

npm i bpk-component-pagination

Weekly Downloads

1

Version

5.1.2

License

Apache-2.0

Unpacked Size

52.5 kB

Total Files

26

Last publish

Collaborators

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