/*! * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved. * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and limitations under the License. */ import { paginationTypeValues } from "./constants.js"; export type PaginationProps = { /** * The labeled rendered for the current page index */ currentPageLabel?: string; /** * The number of items currently visible on the page */ currentRowsCount?: number; /** * If `true`, shows a page-number input allowing users to navigate directly to a page. * @default true */ hasPageInput?: boolean; /** * If `true`, shows a rows-per-page input allowing users to change how many rows are visible. * @default true */ hasRowCountInput?: boolean; /** * If `true`, shows the "X – X of total X" row count label. * @default true */ hasRowCountLabel?: boolean; /** * If `true`, all pagination controls are disabled. */ isDisabled?: boolean; /** * If `true`, the next-page or Show More button is disabled. */ isMoreDisabled?: boolean; /** * The current page last row index */ lastRow?: number; /** * If the pagination is of "loadMore" variant, then this is the the load more label */ loadMoreLabel?: string; /** * The max page */ maxPageIndex?: number; /** * The max rows per page */ maxPageSize?: number; /** * The label for the next control */ nextLabel?: string; /** * Called when the page index or page size changes. Receives the new page index and page size. */ onPaginationChange: ({ pageIndex, pageSize, }: { pageIndex: number; pageSize: number; }) => void; /** * The current page index */ pageIndex: number; /** * The current page size */ pageSize: number; /** * The label for the previous control */ previousLabel?: string; /** * The label that shows how many results are rendered per page */ rowsPerPageLabel?: string; /** * Total rows count */ totalRows?: number; /** * The type of pagination controls shown. Defaults to next/prev buttons, but can be set to a simple "Load more" button by setting to "loadMore". */ variant?: (typeof paginationTypeValues)[number]; }; declare const MemoizedPagination: import("react").MemoExoticComponent<({ currentPageLabel: currentPageLabelProp, currentRowsCount, hasPageInput, hasRowCountInput, hasRowCountLabel, isDisabled, isMoreDisabled, lastRow, loadMoreLabel: loadMoreLabelProp, maxPageIndex, maxPageSize, nextLabel: nextLabelProp, onPaginationChange: onPaginationChangeProp, pageIndex, pageSize, previousLabel: previousLabelProp, rowsPerPageLabel: rowsPerPageLabelProp, totalRows, variant, }: PaginationProps) => import("@emotion/react/jsx-runtime").JSX.Element>; export { MemoizedPagination as Pagination }; //# sourceMappingURL=Pagination.d.ts.map