UNPKG

@ant-design/pro-flow

Version:
29 lines (28 loc) 1.4 kB
import { JSXElementConstructor } from 'react'; import ReactFlow, { Connection, Edge, NodeTypes, Viewport } from 'reactflow'; import 'reactflow/dist/style.css'; import { FlowEditorInstance } from '../hooks/useFlowEditor'; export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{ container: import("antd-style").SerializedStyles; minimap: import("antd-style").SerializedStyles; }>; type ComponentProps<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = T extends JSXElementConstructor<infer P> ? P : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : Record<string, never>; export interface FlowEditorAppProps { nodeTypes?: NodeTypes; defaultViewport?: Viewport; contextMenuEnabled?: boolean; onNodesInit?: (editor: FlowEditorInstance) => void; onNodesInitChange?: (init: boolean) => void; beforeConnect?: (connection: Connection) => boolean; onConnect?: (connection: Connection) => void; afterConnect?: (edge: Edge) => void; style?: React.CSSProperties; flowProps?: ComponentProps<typeof ReactFlow>; className?: string; children?: React.ReactNode; background?: boolean; miniMap?: boolean; hotkeyManager?: boolean; } declare const FlowEditor: import("react").ForwardRefExoticComponent<FlowEditorAppProps & import("react").RefAttributes<any>>; export default FlowEditor;