UNPKG

gridcellx

Version:

GridCell component for React, written in TypeScript

57 lines (47 loc) 994 B
import { ComponentClass } from "react"; import React from "react"; declare const GRow: React.FC; declare const GCol: ComponentClass<{ key?: string | number; inherit?: boolean; span?: number; children?: React.ReactNode; }>; import { CSSProperties } from "react"; declare enum CellType { /** * 文本cell,不能作为容器 */ Text, /** * 容器cell,渲染其child */ Group, /** * 自定义cell,渲染render */ Custom, /** * 内部cell,渲染内部表格 */ InnerCell } declare enum DataType { Default, List } declare class Cell { text?: string; dataType?: DataType; type?: CellType; span?: number; render?: Function; child?: Cell[]; className?: string; style?: CSSProperties; iCell?: Cell; } export { Cell, CellType, DataType, GRow, GCol }; declare const GridCell: ComponentClass<{ cell: Cell }>; export as namespace GridCell; export default GridCell;