import React from 'react'; import { Row } from 'react-table'; export declare const Table: React.MemoExoticComponent<({ columns: columnsProps, rows: rowsProps, selectable, isLoading, emptyText, onChange, selectedData, disabledRows, }: TableProps) => JSX.Element>; declare type CellWrapperProp = React.ComponentClass | React.FunctionComponent; declare type TextAlignProp = 'left' | 'right' | 'center'; declare type TableRowProp = { /** * Cell content. `Key` must be equal to `columns.id` value */ [key: string]: unknown; /** * Props to `columns.cellWrapper` component. Usually an `href` or related */ cellWrapperProps?: { [key: string]: unknown; }; }; export interface TableProps { /** * Columns of the Table */ columns: { /** * ID of the column */ id: string; /** * Label of the column. Can be an String or Component */ label: string | React.ReactNode; /** * Size of the column */ size?: string; /** * Component to wrap a cell. Usually an or related. Props of each cell are placed at `rows.cellWrapperProps` */ cellWrapper?: CellWrapperProp; /** * Text align of the column */ textAlign?: TextAlignProp; }[]; /** * Rows of the table */ rows: TableRowProp[]; /** Table is loading * @default false */ isLoading?: boolean; /** Content to show when table is empty * @default 'Nenhum registro encontrado' */ emptyText?: string | React.ReactNode; /** * Makes rows selectable. * @default false */ selectable?: boolean; /** * Fired when the row is selectable and the Checkbox of the header/row is clicked */ onChange?: (selectedRows: Row[]) => void; /** * Array containing the index of selected rows. * @default undefined */ selectedData?: number[]; /** * Array containing the index of disabled rows. * @default [] */ disabledRows?: number[]; } export {};