@swrve/core
Version:
Core set of Swrve UI Components
25 lines (14 loc) • 660 B
Markdown
`@swrve/core`
`import { Pagination } from '@swrve/core'`
Will try keep this is as simple as possible for now just creating basic as possible pagination component.
`activePage` Currently active page
`numberOfPages` Total number of pages
`maxButtons` Max Number of buttons to show with page numbers
`onSelect` callback to be fired when clicking on pagination button will return `page number`
Prev / Next buttons to be displayed if it makes sense. I.e. if on page 0 then `Prev` is hidden / disabled, or if `activePage` equals `numberOfPages` then next is disabled.