apphouse
Version:
Component library for React that uses observable state management and theme-able components.
47 lines (46 loc) • 1.21 kB
TypeScript
import React from 'react';
import { CSSProperties } from 'glamor';
import { ApphouseComponent } from './component.interfaces';
/**
* Styles for the Pagination component.
*/
export interface PaginationStyles {
nav?: CSSProperties;
ul?: CSSProperties;
li?: CSSProperties;
}
/**
* Props for the Pagination component.
*/
export interface PaginationProps extends ApphouseComponent<PaginationStyles> {
/**
* The current page number.
*/
currentPage: number;
/**
* The total number of pages.
*/
totalPages: number;
/**
* Callback function invoked when a page is changed.
*
* @param pageNumber - The selected page number.
*/
onPageChange: (pageNumber: number) => void;
/**
* If true, the next button will be disabled.
* if showPrevNext is false, this prop will block next buttons to be clicked
* @default false
*/
disableNext?: boolean;
/**
* if true, the pagination will be hidden when there is only one page
* @default false
*/
hideWhenOnePage?: boolean;
/**
* the size of the page
*/
pageSize?: number;
}
export declare const PagePagination: React.FC<PaginationProps>;