@wonderflow/react-components
Version:
UI components from Wonderflow's Wanda design system
35 lines • 1.41 kB
TypeScript
/// <reference types="react" />
import { ReactPaginateProps } from 'react-paginate';
import { Except } from 'type-fest';
export declare type PaginationProps = Except<ReactPaginateProps, 'pageCount'> & {
/**
* Set the total number of items to paginate through.
*/
itemsCount: number;
/**
* Set the number of items to display per page.
*/
itemsPerPage?: number;
/**
* Set the number of pages to display. If missing this is computed by
* the `itemsCount` divided by `itemsPerPage`.
*/
pageCount?: number;
/**
* Callback function to be called when the page is changed. A an `object`
* is passed with the following properties:
* - `selected`: The index of the selected page.
* - `offset`: The offset of the selected page.
*/
onPageClick?: (data: Record<string, number>) => void;
/**
* Set how many pages to show in the visible page range (between the "..." break)
*/
pageRangeDisplayed?: ReactPaginateProps['pageRangeDisplayed'];
/**
* The number of visible pages to display on the sides.
*/
marginPagesDisplayed?: ReactPaginateProps['marginPagesDisplayed'];
};
export declare const Pagination: ({ className, itemsCount, itemsPerPage, onPageClick, pageCount, pageRangeDisplayed, marginPagesDisplayed, ...otherProps }: PaginationProps) => JSX.Element;
//# sourceMappingURL=pagination.d.ts.map