Merge pull request #5144 from dimaMachina/tsdoc-10

This commit is contained in:
Moritz Klack
2025-04-01 21:33:39 +02:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
'@xyflow/react': patch
---
fix: compare `nodeStrokeWidth` with `number`, not with `string`

View File

@@ -143,7 +143,7 @@ function MiniMapComponent<NodeType extends Node = Node>({
typeof maskStrokeWidth === 'number' ? maskStrokeWidth * viewScale : undefined,
'--xy-minimap-node-background-color-props': typeof nodeColor === 'string' ? nodeColor : undefined,
'--xy-minimap-node-stroke-color-props': typeof nodeStrokeColor === 'string' ? nodeStrokeColor : undefined,
'--xy-minimap-node-stroke-width-props': typeof nodeStrokeWidth === 'string' ? nodeStrokeWidth : undefined,
'--xy-minimap-node-stroke-width-props': typeof nodeStrokeWidth === 'number' ? nodeStrokeWidth : undefined,
} as CSSProperties
}
className={cc(['react-flow__minimap', className])}