Merge pull request #3054 from wbkd/fix/controls-lock

fix(controls): show correct icon for interactivity button
This commit is contained in:
Moritz Klack
2023-05-15 11:12:06 +02:00
committed by GitHub
2 changed files with 8 additions and 5 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@reactflow/controls': patch
---
fix(icons): show correct lock icon
+3 -5
View File
@@ -1,8 +1,6 @@
import { memo, useEffect, useState } from 'react';
import type { FC, PropsWithChildren } from 'react';
import { memo, useEffect, useState, type FC, type PropsWithChildren } from 'react';
import cc from 'classcat';
import { useStore, useStoreApi, useReactFlow, Panel } from '@reactflow/core';
import type { ReactFlowState } from '@reactflow/core';
import { useStore, useStoreApi, useReactFlow, Panel, type ReactFlowState } from '@reactflow/core';
import PlusIcon from './Icons/Plus';
import MinusIcon from './Icons/Minus';
@@ -13,7 +11,7 @@ import ControlButton from './ControlButton';
import type { ControlProps } from './types';
const isInteractiveSelector = (s: ReactFlowState) => s.nodesDraggable && s.nodesConnectable && s.elementsSelectable;
const isInteractiveSelector = (s: ReactFlowState) => s.nodesDraggable || s.nodesConnectable || s.elementsSelectable;
const Controls: FC<PropsWithChildren<ControlProps>> = ({
style,