Socket
Book a DemoInstallSign in
Socket

@commercetools-uikit/pagination

Package Overview
Dependencies
Maintainers
3
Versions
861
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools-uikit/pagination

Components for navigating through pages of items

Source
npmnpm
Version
0.0.0-canary-20211313109
Version published
Weekly downloads
2.4K
-20.94%
Maintainers
3
Weekly downloads
 
Created
Source

Pagination

Description

Components for navigating through pages of items

Installation

yarn add @commercetools-uikit/pagination
npm --save install @commercetools-uikit/pagination

Additionally install the peer dependencies (if not present)

yarn add react react-intl
npm --save install react react-intl

Usage

import React from 'react';
import { Pagination } from '@commercetools-uikit/pagination';

const Example = ({ items }) => (
  <Pagination
    totalItems={items.length}
    currentPage={1}
    onPageChange={() => {}}
    onPageSizeChange={() => {}}
  />
);

export default Example;

Properties

PropsTypeRequiredDefaultDescription
totalItemsnumberTotal number of items across all pages
currentPagenumberThe currently selected page
onPageChangefuncA callback function, called when the page is changed.
Signature: (page: number) => void
Signature: (page: number) => void
pageSizenumber20Number of items per page, according to the pre-defined range values.
pageSizeRangeenum
Possible values:
's', 'm', 'l'
's'Range of items per page.
s: 20,50
m: 20,50,100
l: 200,500
onPageSizeChangefuncA callback function, called when pageSize is changed.
Signature: (pageSize: number) => void

Keywords

javascript

FAQs

Package last updated on 03 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts