diff --git a/packages/minimap/src/MiniMap.tsx b/packages/minimap/src/MiniMap.tsx index bb4a2f89..378ee4f6 100644 --- a/packages/minimap/src/MiniMap.tsx +++ b/packages/minimap/src/MiniMap.tsx @@ -64,6 +64,9 @@ function MiniMap({ pannable = false, zoomable = false, ariaLabel = 'React Flow mini map', + // Rename the field to avoid clashes with the default `MiniMapNode` component. + // Fallback to that component if none is provided. + MiniMapNode: CustomMiniMapNode = MiniMapNode, }: MiniMapProps) { const store = useStoreApi(); const svg = useRef(null); @@ -176,7 +179,7 @@ function MiniMap({ const { x, y } = getNodePositionWithOrigin(node, nodeOrigin).positionAbsolute; return ( - = (node: Node) => string; @@ -19,6 +19,7 @@ export type MiniMapProps = Omit, ' pannable?: boolean; zoomable?: boolean; ariaLabel?: string | null; + MiniMapNode?: ComponentType; }; export interface MiniMapNodeProps {