refactor(nodes): make nopan class overwritable

This commit is contained in:
moklick
2022-10-03 13:01:42 +02:00
parent 25d88893a2
commit a3147dc4b8

View File

@@ -151,13 +151,16 @@ export default (NodeComponent: ComponentType<NodeProps>) => {
className={cc([
'react-flow__node',
`react-flow__node-${type}`,
{
// this is overwritable by passing `nopan` as a class name
[noPanClassName]: isDraggable,
},
className,
{
selected,
selectable: isSelectable,
parent: isParent,
dragging,
[noPanClassName]: isDraggable,
},
])}
ref={nodeRef}