import { ReactElement } from 'react'; import { TableDataTypes } from '../enums'; export interface ITableProps { dataSource: Array; columns: Array; pageSize: number; pageIndex: number; disableRowIndex?: boolean; operations: Array; countOfRows?: number; enableClientPagination: boolean; infinityPagination?: boolean; onPageChange?: (newPage: number) => void; onRowClick?: (row: any) => void; rowsPerPageOptions?: boolean; paddingSize: "medium" | "small"; children?: any; } export interface TableColumn { dataField: keyof Fields | string; title: string; dataType?: TableDataTypes; width?: string; minWidth?: string; isSortable?: boolean; cssClasses?: Array; headerCssClasses?: Array; align?: "left" | "center"; format?: (cellValue?: any, rowValue?: Fields) => any; isDisableOnRowClick?: boolean; } export interface TableOperations { icon?: ReactElement; title: string; condition?: (row: any) => boolean; click?: (row: any) => void; isDisabled?: boolean; }