* fix(ts): use strict mode strictNullChecks etc * chore: Use extended React.HTMLAttributes<> (#41) * refactor(code-format): add prettier closes #42 * feat(renderer): add snap to grid option closes #20 * chore(dependabot): use develop as target branch
18 lines
812 B
TypeScript
18 lines
812 B
TypeScript
import React from 'react';
|
|
import { HandleType, ElementId, Position, XYPosition, OnConnectFunc, Connection } from '../../types';
|
|
declare type ValidConnectionFunc = (connection: Connection) => boolean;
|
|
declare type SetSourceIdFunc = (nodeId: ElementId | null) => void;
|
|
interface BaseHandleProps {
|
|
type: HandleType;
|
|
nodeId: ElementId;
|
|
onConnect: OnConnectFunc;
|
|
position: Position;
|
|
setSourceId: SetSourceIdFunc;
|
|
setPosition: (pos: XYPosition) => void;
|
|
isValidConnection: ValidConnectionFunc;
|
|
id?: ElementId | boolean;
|
|
className?: string;
|
|
}
|
|
declare const BaseHandle: React.MemoExoticComponent<({ type, nodeId, onConnect, position, setSourceId, setPosition, className, id, isValidConnection, ...rest }: BaseHandleProps) => JSX.Element>;
|
|
export default BaseHandle;
|