Pagination
This is the <Pagination />
component.
of 10
Basic Usage
import Pagination from '@candy/kitkat/pagination'
export const MyComponent = () => (
<Pagination
page={page}
pageCount={pageCount || 1}
onPageChange={onPageChange}
previousButton={<ArrowLeft width={24} height={24} />}
nextButton={<ArrowRight width={24} height={24} />}
/>
)
Props
Name | Type | Default | Description |
---|---|---|---|
className? | string | '' | Css class name |
nextButton? | ReactNode | {'>'} | Next button element |
onPageChange? | ((page: number) => void) | null | null | Callback function when the page has changed |
page | 'light' | 'dark' | dark | Current page |
pageCount | any[] | Total number of pages | |
previousButton? | ReactNode | {'<'} | Previous button element |