@igloo-ui/pager
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Pager

Pagers allow users to navigate through items of the same table or list.

Installation

To install @igloo-ui/pager in your project, you will need to run the following command using npm:

npm install @igloo-ui/pager

If you prefer Yarn, use the following command instead:

yarn add @igloo-ui/pager

Usage

Then to use the component in your code, import it!

import Pager from '@igloo-ui/pager';

const [currentPage, setCurrentPage] = React.useState(1);

  <Pager
    pageSize={5}
    totalCount={200}
    currentPage={currentPage}
    onPageChange={(page) => setCurrentPage(page)}
  />

Internationalization

The Pager component uses the @igloo-ui/provider package to receive the correct locale. This should be wrapped around the entire application.

import IglooProvider from '@igloo-ui/provider';

<IglooProvider locale="fr-CA">
  <Pager
    pageSize={5}
    totalCount={200}
    currentPage={currentPage}
    onPageChange={(page) => setCurrentPage(page)}
  />
</IglooProvider>

Readme

Keywords

none

Package Sidebar

Install

npm i @igloo-ui/pager

Weekly Downloads

241

Version

1.0.2

License

Apache-2.0

Unpacked Size

315 kB

Total Files

10

Last publish

Collaborators

  • infra.admin
  • franckgaudin