UNPKG

@clubmed/trident-ui

Version:

Shared ClubMed React UI components

39 lines (38 loc) 1.15 kB
import { FunctionComponent, HTMLAttributes } from 'react'; import { generatePagination } from './Pagination.helper'; import { ScrollerLabels } from '../types/ScrollerLabels'; export interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> { /** * The current page number (must be >= 1) */ defaultPage: number; /** * The total pages number */ count: number; /** * A callback function to handle page changes. */ onChange: (page: number) => void; /** * Additional class names for the previous & next buttons */ buttonClassName?: string; /** * Additional class names for the label of the previous & next buttons */ buttonLabelClassName?: string; /** * Additional class names */ className?: string; /** * UI Labels */ labels: ScrollerLabels; /** * A pagination factory to generate an array of Pagination elements (pageNumber, ellipsis, next button, previous button). */ paginationFactory?: typeof generatePagination; } export declare const Pagination: FunctionComponent<PaginationProps>;