UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

37 lines (36 loc) 1.02 kB
import { ResponsiveValue } from "../hooks/useResponsiveValue.js"; import { PageDataProps } from "./model.js"; import React from "react"; //#region src/Pagination/Pagination.d.ts type PageProps = { key: string; children: React.ReactNode; number: number; className: string; 'data-component': 'Pagination.Page'; } & Omit<PageDataProps['props'], 'as' | 'role'>; type PaginationProps = { className?: string; pageCount: number; currentPage: number; onPageChange?: (e: React.MouseEvent, n: number) => void; hrefBuilder?: (n: number) => string; marginPageCount?: number; showPages?: boolean | ResponsiveValue<boolean>; surroundingPageCount?: number; renderPage?: (props: PageProps) => React.ReactNode; }; declare function Pagination({ className, pageCount, currentPage, onPageChange, hrefBuilder, marginPageCount, showPages, surroundingPageCount, renderPage, ...rest }: PaginationProps): React.JSX.Element; //#endregion export { PageProps, PaginationProps, Pagination as default };