@confi/conflux-react-ui-test-package
Version:
Modern and minimalist React UI library.
31 lines (30 loc) • 1.08 kB
TypeScript
import React from 'react';
import TableColumn from './table-column';
export declare type TableOnRow = (row: any, index: number) => void;
export declare type TableOnCell = (cell: any, index: number, colunm: number) => void;
export declare type TableOnChange = (data: any) => void;
interface Props {
data?: Array<any>;
emptyText?: string;
hover?: boolean;
onRow: TableOnRow;
onCell: TableOnCell;
onChange: TableOnChange;
className?: string;
}
declare const defaultProps: {
hover: boolean;
emptyText: string;
onRow: TableOnRow;
onCell: TableOnCell;
onChange: TableOnChange;
className: string;
};
declare type NativeAttrs = Omit<React.TableHTMLAttributes<any>, keyof Props>;
export declare type TableProps = Props & typeof defaultProps & NativeAttrs;
declare type TableComponent<P = {}> = React.FC<P> & {
Column: typeof TableColumn;
};
declare type ComponentProps = Partial<typeof defaultProps> & Omit<Props, keyof typeof defaultProps> & NativeAttrs;
declare const _default: TableComponent<ComponentProps>;
export default _default;