tdesign-react
Version:
TDesign Component for React
37 lines (36 loc) • 1.39 kB
TypeScript
import React, { MouseEvent, MutableRefObject, ReactNode } from 'react';
import { BaseTableCellParams, RowspanColspan, TableRowData, TdBaseTableProps } from './type';
import { RowAndColFixedPosition } from './interface';
import { TableClassName } from './hooks/useClassName';
import { PaginationProps } from '../pagination';
export interface RenderEllipsisCellParams {
cellNode: ReactNode;
tableElm?: HTMLDivElement;
columnLength: number;
classPrefix?: string;
overlayClassName?: string;
}
export interface CellProps {
cellParams: BaseTableCellParams<TableRowData>;
rowAndColFixedPosition: RowAndColFixedPosition;
columnLength: number;
dataLength: number;
cellSpans: RowspanColspan;
cellEmptyContent: TdBaseTableProps['cellEmptyContent'];
tableClassNames: TableClassName;
tableRef?: MutableRefObject<HTMLDivElement>;
classPrefix?: string;
overlayClassName?: string;
pagination?: PaginationProps;
rowspanAndColspan: TdBaseTableProps['rowspanAndColspan'];
onClick?: (e: MouseEvent<HTMLTableCellElement>) => void;
}
export declare function renderCell(params: BaseTableCellParams<TableRowData>, extra?: {
cellEmptyContent?: TdBaseTableProps['cellEmptyContent'];
pagination?: PaginationProps;
}): any;
declare const Cell: {
(props: CellProps): React.JSX.Element;
displayName: string;
};
export default Cell;