Skip to content

Commit

Permalink
Update readme test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexasselin008 committed Feb 22, 2024
1 parent 7a64441 commit aca5a78
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions packages/Pager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,32 @@ It also requires the Provider package from Igloo to receive the correct locale.
This should be wrapped around the entire application.

```jsx
import IglooProvider from '@igloo-ui/provider';
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`](https://igloo.officevibe.design/component/Provider) package to receive the correct locale. This should be wrapped around the entire application.

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

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

0 comments on commit aca5a78

Please sign in to comment.