@sinchsmb/ui-kit
Version:
UI kit for SinchSMB frontend
22 lines (21 loc) • 685 B
TypeScript
/// <reference types="react" />
import { CommonProps } from '../../types';
/** Props for the {@link Pagination} component */
export interface PaginationProps extends CommonProps {
/** Current active page starts from 0 */
currentPage: number;
/** Total pages */
totalPages: number;
/** Function that used for build page links to params */
linkToBuilder: (pageNumber: number) => string;
}
/**
* Pagination component.
*
* ```tsx
* import { Pagination } from 'ui-kit';
*
* <Pagination currentPage={0} totalPages={40} linkToBuilder={(pageNumber) => `/?page=${pageNumber}`} />
* ```
*/
export declare function Pagination(props: PaginationProps): JSX.Element;