import { default as React } from 'react'; import { default as PropTypes } from 'prop-types'; export interface PaginationProps { /** * Total number of pages * If the number of pages is 1, pagination will not render */ totalPages?: number; /** * Default selected page by page number (uncontrolled) */ defaultSelectedPage?: number; /** * Selected page by page number (controlled). * In fully controlled mode, you **must** define an `onPageChange` * handler to update the value of the `selectedPage` prop. */ selectedPage?: number; /** * Callback invoked when user selects a new page via page numbers or * previous/next arrows. * * Invoked with selected page number as the argument. */ onPageChange?: (page: number) => void; /** Optional value for `data-testid` attribute */ testId?: string; } /** * Component that allows users to navigate between pages of information. * Your application is responsible for setting the total number of pages and * responding to the `onPageChange` callback. * * The component will handle which page numbers to render, next and previous arrows, * and conditionally rendering first and last pages. * * If your pagination setup expects a fully controlled component, you may set `defaultSelectedPage` on every `onPageChange` call. */ declare const Pagination: { ({ onPageChange, totalPages, defaultSelectedPage, selectedPage: selectedPageControlled, testId, }: PaginationProps): React.JSX.Element; propTypes: { /** * Total number of pages * If the number of pages is 1, pagination will not render */ totalPages: PropTypes.Requireable; /** * Default selected page by page number (uncontrolled) */ defaultSelectedPage: PropTypes.Requireable; /** * Selected page by page number (controlled). * In fully controlled mode, you **must** define an `onPageChange` * handler to update the value of the `selectedPage` prop. */ selectedPage: PropTypes.Requireable; /** * Callback invoked when user selects a new page via page numbers or * previous/next arrows. * * Invoked with selected page number as the argument. */ onPageChange: PropTypes.Requireable<(...args: any[]) => any>; /** Optional value for `data-testid` attribute */ testId: PropTypes.Requireable; }; }; export default Pagination; //# sourceMappingURL=index.d.ts.map