1.0.4 • Published 5 days ago

@igloo-ui/pager v1.0.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 days ago

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>
1.0.4

5 days ago

1.0.3

20 days ago

1.0.2

1 month ago

1.0.1

3 months ago

1.0.0

3 months ago

0.3.0

4 months ago

0.2.4

4 months ago

0.2.3

5 months ago

0.2.2

5 months ago

0.2.1

6 months ago

0.2.0

8 months ago

0.1.4

10 months ago

0.1.5

10 months ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.0

2 years ago