@grafana/ui
Version:
Grafana Components Library
22 lines (21 loc) • 1.05 kB
TypeScript
export interface Props {
/** The current page index being shown. */
currentPage: number;
/** Number of total pages. */
numberOfPages: number;
/** Callback function for fetching the selected page. */
onNavigate: (toPage: number) => void;
/** When set to true and the pagination result is only one page it will not render the pagination at all. */
hideWhenSinglePage?: boolean;
/** Small version only shows the current page and the navigation buttons. */
showSmallVersion?: boolean;
className?: string;
/** If we are using cursor based pagination, disable next page button when we have no cursor */
hasNextPage?: boolean;
}
/**
* Component used for rendering a page selector below paginated content.
*
* https://developers.grafana.com/ui/latest/index.html?path=/docs/navigation-pagination--docs
*/
export declare const Pagination: ({ currentPage, numberOfPages, onNavigate, hideWhenSinglePage, showSmallVersion, className, hasNextPage, }: Props) => import("react/jsx-runtime").JSX.Element | null;