react-smart-data-table
Version:
A smart data table component for React.js meant to be configuration free
17 lines (16 loc) • 581 B
TypeScript
import { ComponentType } from 'react';
import { PageChangeFn } from '../PaginatorItem';
import * as utils from '../../helpers/functions';
export interface WrappedComponentProps {
activePage: number;
onPageChange: PageChangeFn;
totalPages: number;
}
interface PaginationWrapperProps<T = utils.UnknownObject> {
rows: T[];
perPage: number;
activePage: number;
onPageChange: PageChangeFn;
}
declare const withPagination: <T>(WrappedComponent: ComponentType<WrappedComponentProps>) => ComponentType<PaginationWrapperProps<T>>;
export default withPagination;