reablocks
Version:
Component library for React
63 lines (61 loc) • 1.51 kB
TypeScript
import { PagerTheme } from './PagerTheme';
import { FC, ReactNode } from 'react';
export interface PagerProps {
/**
* The class name to add to the pager.
*/
className?: string;
/**
* The class name to add to the page buttons.
*/
pageClassName?: string;
/**
* The class name for the active page button.
*/
activePageClassName?: string;
/**
* The class name to add to the pages container.
*/
pagesContainerClassName?: string;
/**
* The current page number.
*/
page: number;
/**
* The number of items per page.
*/
size: number;
/**
* The total number of items.
*/
total: number;
/**
* The React node or string to use for the previous arrow.
*/
previousArrow?: ReactNode | string;
/**
* The React node or string to use for the next arrow.
*/
nextArrow?: ReactNode | string;
/**
* The React node or string to use for the start arrow.
*/
startArrow?: ReactNode | string;
/**
* The React node or string to use for the end arrow.
*/
endArrow?: ReactNode | string;
/**
* A callback function that is called when the page changes.
*/
onPageChange?: (page: number) => void;
/**
* The type of table data for the pager to display.
*/
displayMode?: 'pages' | 'items' | 'all';
/**
* The theme for the Pager.
*/
theme?: PagerTheme;
}
export declare const Pager: FC<PagerProps>;