docs(pagination-nav): add more examples

This commit is contained in:
Eric Liu 2022-10-08 13:31:18 -07:00
commit f851fbbcc9

View file

@ -5,8 +5,35 @@
## Default ## Default
`PaginationNav` renders `10` items and does not loop by default.
<PaginationNav /> <PaginationNav />
## Total
Use the `total` prop to specify the number of pages.
<PaginationNav total={3} />
## Loopable ## Loopable
Set `loop` to `true` for navigation to be looped.
<PaginationNav total={3} loop /> <PaginationNav total={3} loop />
## Shown
If `total` is greater than `10`, the number of items shown will be truncated to `10`.
Use `shown` to override the number of items shown.
<PaginationNav total={100} shown={5} />
## Custom button text
Use the `forwardText` and `backwardText` props to customize the button text.
<PaginationNav
forwardText="Next"
backwardText="Previous"
/>