Skip to content

Commit

Permalink
refactor(nodes): make nopan class overwritable
Browse files Browse the repository at this point in the history
  • Loading branch information
moklick committed Oct 3, 2022
1 parent 25d8889 commit a3147dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/components/Nodes/wrapNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit a3147dc

Please sign in to comment.