import './index.css'; import { type PageRangeDisplayed, type Size } from './PaginationContext'; interface PaginationCommonProps { page: number; pageCount: number; pageRangeDisplayed?: PageRangeDisplayed; size?: Size; ariaLabelPrev?: string; ariaLabelNext?: string; } type NavProps = Omit, 'onChange'>; /** * Pagination component. Use either `onChange` (button mode) or `makeUrl` (link mode). * * @example * // Button mode - for client-side state * * * @example * // Link mode - for server routing / static pages * `?page=${p}`} /> * * @example * // Link mode with custom component (e.g. Next.js Link) * `?page=${p}`} component={Link} /> * * @example * // Link mode with linkProps (e.g. Next.js scroll) * `?page=${p}`} component={Link} linkProps={{ scroll: 'marker' }} /> */ export type PaginationProps = PaginationCommonProps & NavProps & ({ onChange(newPage: number): void; makeUrl?: never; component?: never; linkProps?: undefined; } | { makeUrl(page: number): string; onChange?: never; /** * The component used for link elements. Receives `href`, `className`, and `children`. * @default 'a' */ component?: T; /** * Additional props passed to all link elements (e.g. Next.js Link's scroll, prefetch). */ linkProps?: Omit, 'href' | 'children'>; }); export default function Pagination({ page, pageCount, pageRangeDisplayed, size, onChange, makeUrl, component: LinkComponent, linkProps, className, ariaLabelNext, ariaLabelPrev, ...navProps }: PaginationProps): import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=index.d.ts.map