refactor(nodes): make nopan class overwritable

This commit is contained in:
moklick
2022-10-03 13:01:42 +02:00
parent 25d88893a2
commit a3147dc4b8
@@ -151,13 +151,16 @@ export default (NodeComponent: ComponentType<NodeProps>) => {
className={cc([ className={cc([
'react-flow__node', 'react-flow__node',
`react-flow__node-${type}`, `react-flow__node-${type}`,
{
// this is overwritable by passing `nopan` as a class name
[noPanClassName]: isDraggable,
},
className, className,
{ {
selected, selected,
selectable: isSelectable, selectable: isSelectable,
parent: isParent, parent: isParent,
dragging, dragging,
[noPanClassName]: isDraggable,
}, },
])} ])}
ref={nodeRef} ref={nodeRef}