@octopusdeploy/design-system-components
Version:
The design systems component library.
44 lines (43 loc) • 1.21 kB
TypeScript
type TotalResultsProps = {
/**
* The total results that have been paginated.
*/
totalResults: "unknown";
/**
* Whether there are more pages to show.
*/
hasMoreResults: boolean;
} | {
/**
* The total results that have been paginated.
*/
totalResults: number;
};
export type PaginationProps = {
/**
* The label for the pagination controls.
*/
label: string;
/**
* The current page being displayed.
*/
currentPage: number;
/**
* The range of options to present for the number of items per page.
*/
itemsPerPageOptions: readonly number[];
/**
* The selected number of items per page.
*/
selectedItemsPerPage: number;
/**
* The callback to run when the page is changed.
*/
onPageChange: (page: number) => void;
/**
* The callback to run when the page size is changed.
*/
onPageSizeChange: (pageSize: number) => void;
} & TotalResultsProps;
export declare function Pagination({ label, currentPage, itemsPerPageOptions, selectedItemsPerPage, onPageChange, onPageSizeChange, ...props }: PaginationProps): import("react/jsx-runtime").JSX.Element;
export {};