duoyun-ui
Version:
A lightweight desktop UI component library, implemented using Gem
37 lines (36 loc) • 1.75 kB
TypeScript
import { HTMLAttributes, RefAttributes } from 'react';
import { ForwardRefExoticComponent } from 'react';
import { DuoyunTableElement } from '../elements/table';
export * from '../elements/table';
export type DyTableProps = HTMLAttributes<HTMLDivElement> & RefAttributes<DuoyunTableElement> & {
caption?: DuoyunTableElement['caption'];
headless?: DuoyunTableElement['headless'];
noData?: DuoyunTableElement['noData'];
selectable?: DuoyunTableElement['selectable'];
selection?: DuoyunTableElement['selection'];
selectionContainer?: DuoyunTableElement['selectionContainer'];
'onselect'?: (event: CustomEvent<Parameters<DuoyunTableElement['select']>[0]>) => void;
'onitemclick'?: (event: CustomEvent<Parameters<DuoyunTableElement['itemclick']>[0]>) => void;
'onitemcontextmenu'?: (event: CustomEvent<Parameters<DuoyunTableElement['itemcontextmenu']>[0]>) => void;
columns?: DuoyunTableElement['columns'];
data?: DuoyunTableElement['data'];
getRowStyle?: DuoyunTableElement['getRowStyle'];
rowKey?: DuoyunTableElement['rowKey'];
getKey?: DuoyunTableElement['getKey'];
expandedRowRender?: DuoyunTableElement['expandedRowRender'];
getActions?: DuoyunTableElement['getActions'];
'onexpand'?: (event: CustomEvent<Parameters<DuoyunTableElement['expand']>[0]>) => void;
};
export type DyTableExpose = {
appendSelection: DuoyunTableElement['appendSelection'];
removeSelection: DuoyunTableElement['removeSelection'];
};
declare global {
namespace JSX {
interface IntrinsicElements {
'dy-table': DyTableProps;
}
}
}
export declare const DyTable: ForwardRefExoticComponent<Omit<DyTableProps, "ref"> & RefAttributes<DyTableExpose>>;
export default DyTable;