fix(nodes): pass connectable to correct prop

This commit is contained in:
braks
2022-10-13 23:23:43 +02:00
committed by Braks
parent 3fcc163509
commit bc80807285
3 changed files with 4 additions and 4 deletions
@@ -12,9 +12,9 @@ const DefaultNode: FunctionalComponent<NodeProps> = function ({
isValidSourcePos, isValidSourcePos,
}) { }) {
return [ return [
h(Handle, { type: 'target', position: targetPosition, isConnectable: connectable, isValidConnection: isValidTargetPos }), h(Handle, { type: 'target', position: targetPosition, connectable, isValidConnection: isValidTargetPos }),
typeof label !== 'string' && label ? h(label) : h('div', { innerHTML: label }), typeof label !== 'string' && label ? h(label) : h('div', { innerHTML: label }),
h(Handle, { type: 'source', position: sourcePosition, isConnectable: connectable, isValidConnection: isValidSourcePos }), h(Handle, { type: 'source', position: sourcePosition, connectable, isValidConnection: isValidSourcePos }),
] ]
} }
@@ -11,7 +11,7 @@ const InputNode: FunctionalComponent<NodeProps> = function ({
}) { }) {
return [ return [
typeof label !== 'string' && label ? h(label) : h('div', { innerHTML: label }), typeof label !== 'string' && label ? h(label) : h('div', { innerHTML: label }),
h(Handle, { type: 'source', position: sourcePosition, isConnectable: connectable, isValidConnection: isValidSourcePos }), h(Handle, { type: 'source', position: sourcePosition, connectable, isValidConnection: isValidSourcePos }),
] ]
} }
@@ -10,7 +10,7 @@ const OutputNode: FunctionalComponent<NodeProps> = function ({
isValidTargetPos, isValidTargetPos,
}) { }) {
return [ return [
h(Handle, { type: 'target', position: targetPosition, isConnectable: connectable, isValidConnection: isValidTargetPos }), h(Handle, { type: 'target', position: targetPosition, connectable, isValidConnection: isValidTargetPos }),
typeof label !== 'string' && label ? h(label) : h('div', { innerHTML: label }), typeof label !== 'string' && label ? h(label) : h('div', { innerHTML: label }),
] ]
} }