import { ITableCellProps, TableCellSortDirection } from '../table'; export interface IDataTableCellData { item: ItemType; index: number; } export type DataTableSortDirectionType = TableCellSortDirection; export type IDataTableRowClickHandler = (event: React.MouseEvent, item: IDataTableCellData) => void; interface IDataColumnBase { title: React.ReactNode; width?: string | number; align?: ITableCellProps['align']; padding?: ITableCellProps['padding']; } export type UnionOrString = (string & {}) | T; export interface IDataTableColumnSimple extends IDataColumnBase { field: UnionOrString; sortable?: boolean; } export interface IDataTableColumnRenderable extends IDataColumnBase { render(params: IDataTableCellData): React.ReactNode; } export type IDataTableColumn = IDataTableColumnSimple | IDataTableColumnRenderable; export {};