@rws-air/webcomponents
Version:
Standard Webcomponents for AIR projects
38 lines • 1.61 kB
TypeScript
import { TablePaginationBaseProps, TablePaginationTypeMap } from '@mui/material/TablePagination';
import { TablePaginationActionsProps } from '@mui/material/TablePagination/TablePaginationActions';
import React, { ComponentType, ReactNode } from 'react';
export declare type MutatedMUITablePaginationProps = TablePaginationTypeMap<Record<PropertyKey, unknown>, ComponentType<TablePaginationBaseProps>>['props'];
export interface PaginationProps extends MutatedMUITablePaginationProps {
/** The label in the displayed pages, for example "of" in "page 1 of 10" */
labelPaginationOf: ReactNode;
/** Data-qa tag to apply to the search bar and input element */
'data-qa'?: string;
/** Custom CSS classes to pass to the button */
customClasses?: string | string[];
/**
* The component used for displaying the actions.
* Either a string to use a HTML element or a component.
* @default TablePaginationActions
*/
customPagination?: React.ElementType<TablePaginationActionsProps>;
}
/**
* Constructs a Table pagination using pre-defined Rijkswaterstaat styling
* @param props Props to pass to the table pagination
* @example
* ```jsx
* <TablePagination
* labelRowsPerPage='rows per page'
* labelPaginationOf='of'
* rowsPerPageOptions={[1, 5, 10]}
* rowsPerPage={10}
* page={0}
* count={20}
* onPageChange={console.log}
* onRowsPerPageChange={console.log}
* data-qa='table-pagination'
* />
* ```
*/
export declare const Pagination: React.MemoExoticComponent<(props: PaginationProps) => JSX.Element>;
//# sourceMappingURL=index.d.ts.map