import React from 'react'; import { IntentType, ITestableProps } from '../../../types'; export interface ITableItem { rowClassName?: string; rowIntent?: IntentType; } export type TableCellRendererType = (item: T) => React.ReactNode | React.ReactNode[]; export interface ITableCol { header: React.ReactNode | React.ReactNode[]; headerClassName?: string; cellRenderer?: TableCellRendererType; cellClassName?: string; cellIntent?: (item: T, index: number) => IntentType; } export type TableClumnsRecordType = Record, ITableCol>; export interface ITableProps extends ITestableProps, React.HtmlHTMLAttributes { items: T[]; cols: TableClumnsRecordType; footer?: () => React.ReactNode | React.ReactNode[]; onRowClick?: (item: T, index: number) => void; }