UNPKG

@nodeject/ui-components

Version:

UI library for non-trivial components

21 lines (20 loc) 812 B
import * as React from 'react'; export declare type menuLink = { label: React.ReactNode; action: string; onClick: (nodeId: string, action: string) => void; }; export declare type menu = menuLink[]; export declare type NodeContainerProps = { id: string; children?: React.ReactNode; content?: React.ComponentType<any>; menu?: menu; mode: 'edit' | 'view'; showCoordinates?: any; getCoordinates: (nodeId: string, coordinates: ClientRect | DOMRect) => void; treeCoordinates?: ClientRect | DOMRect; onDeleteNodeRequest: (nodeId: string, deleteDescendants: boolean) => void; onAddNodeRequest: (nodeId: string, as: 'child' | 'parent' | 'siblingBefore' | 'siblingAfter') => void; }; export declare const NodeContainer: React.FC<NodeContainerProps>;