UNPKG

@thehappycoder/react-responsive-pagination

Version:
25 lines (24 loc) 690 B
import React, { Ref } from 'react'; export { useView } from './useView'; export { createViewItem } from './createViewItem'; export declare type ViewComponent = React.ComponentType<{ ref?: Ref<HTMLElement>; items: ViewItem[]; }>; export declare type ViewItem = Page | Nav | Ellipsis; export declare type PageChangeHandler = (page: number) => void; declare type Page = { type: 'page'; active: boolean; page: number; }; declare type Nav = { type: NavType; page?: number; }; declare type Ellipsis = { type: 'ellipsis'; position: EllipsisPosition; }; export declare type NavType = 'next' | 'previous'; export declare type EllipsisPosition = 'left' | 'right';