/** * Copyright 2019, SumUp Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with 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 type { HTMLAttributes, ReactElement } from 'react'; export interface PaginationProps extends Omit, 'onChange'> { /** * The currently active page */ currentPage?: number; /** * The total number of pages */ totalPages: number; /** * Callback for when the page is changed */ onChange: (page: number) => void; /** * Label to describe the type of navigation, e.g. "Pagination" */ label: string; /** * Label for the "previous page" button, "Previous page" */ previousLabel: string; /** * Label for the "next page" button, e.g. "Next page" */ nextLabel: string; /** * Function that returns the label for a page button, * called with the page number, e.g. "Go to page 9" */ pageLabel: (page: number) => string; /** * Function that returns the label after the select element, * called with the total number of pages, e.g. "of 10" */ totalLabel?: (totalPages: number) => string; } /** * Pagination is a component to show pages numbers calculate dynamically. */ export declare const Pagination: ({ currentPage, totalPages, onChange, label, previousLabel, nextLabel, pageLabel, totalLabel, className, ...props }: PaginationProps) => ReactElement | null;