UNPKG

moppium-react-flow-renderer

Version:

[![react-flow](https://user-images.githubusercontent.com/2857535/95224198-b2540000-07fa-11eb-832d-361d72d60345.jpg)](https://reactflow.dev)

26 lines (25 loc) 1.56 kB
import React, { MouseEvent as ReactMouseEvent, CSSProperties } from 'react'; import { HandleType, ElementId, Position, XYPosition, OnConnectFunc, OnConnectStartFunc, OnConnectStopFunc, OnConnectEndFunc, Connection, SetConnectionId } from '../../types'; declare type ValidConnectionFunc = (connection: Connection) => boolean; export declare type SetSourceIdFunc = (params: SetConnectionId) => void; interface BaseHandleProps { type: HandleType; nodeId: ElementId; onConnect: OnConnectFunc; onConnectStart?: OnConnectStartFunc; onConnectStop?: OnConnectStopFunc; onConnectEnd?: OnConnectEndFunc; position: Position; setConnectionNodeId: SetSourceIdFunc; setPosition: (pos: XYPosition) => void; isValidConnection: ValidConnectionFunc; id?: ElementId | null; className?: string; style?: CSSProperties; } export declare function onMouseDown(event: ReactMouseEvent, handleId: ElementId | null, nodeId: ElementId, setConnectionNodeId: SetSourceIdFunc, setPosition: (pos: XYPosition) => void, onConnect: OnConnectFunc, isTarget: boolean, isValidConnection: ValidConnectionFunc, onConnectStart?: OnConnectStartFunc, onConnectStop?: OnConnectStopFunc, onConnectEnd?: OnConnectEndFunc): void; declare const _default: React.MemoExoticComponent<{ ({ type, nodeId, onConnect, onConnectStart, onConnectStop, onConnectEnd, position, setConnectionNodeId, setPosition, className, id, isValidConnection, ...rest }: BaseHandleProps): JSX.Element; displayName: string; }>; export default _default;