fix(nodes): use label content as inner html
This commit is contained in:
@@ -12,7 +12,7 @@ const DefaultNode: FunctionalComponent<NodeProps> = function ({
|
|||||||
}) {
|
}) {
|
||||||
return [
|
return [
|
||||||
h(Handle, { type: 'target', position: targetPosition, isConnectable: connectable, isValidConnection: isValidTargetPos }),
|
h(Handle, { type: 'target', position: targetPosition, isConnectable: connectable, isValidConnection: isValidTargetPos }),
|
||||||
typeof label !== 'string' && label ? h(label) : h('span', {}, 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, isConnectable: connectable, isValidConnection: isValidSourcePos }),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const InputNode: FunctionalComponent<NodeProps> = function ({
|
|||||||
isValidSourcePos,
|
isValidSourcePos,
|
||||||
}) {
|
}) {
|
||||||
return [
|
return [
|
||||||
typeof label !== 'string' && label ? h(label) : h('span', {}, 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, isConnectable: connectable, isValidConnection: isValidSourcePos }),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const OutputNode: FunctionalComponent<NodeProps> = function ({
|
|||||||
}) {
|
}) {
|
||||||
return [
|
return [
|
||||||
h(Handle, { type: 'target', position: targetPosition, isConnectable: connectable, isValidConnection: isValidTargetPos }),
|
h(Handle, { type: 'target', position: targetPosition, isConnectable: connectable, isValidConnection: isValidTargetPos }),
|
||||||
typeof label !== 'string' && label ? h(label) : h('span', {}, label),
|
typeof label !== 'string' && label ? h(label) : h('div', { innerHTML: label }),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user