From 5a9bca1e6229654f7391a0c316995178cfc8b88f Mon Sep 17 00:00:00 2001 From: moklick Date: Mon, 15 May 2023 11:10:39 +0200 Subject: [PATCH 1/2] fix(controls): show correct icon for interactivity button --- packages/controls/src/Controls.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/controls/src/Controls.tsx b/packages/controls/src/Controls.tsx index 73234606..7c529a9e 100644 --- a/packages/controls/src/Controls.tsx +++ b/packages/controls/src/Controls.tsx @@ -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> = ({ style, From 46526b4e02b83d74726701e3ba73d0be8cf80787 Mon Sep 17 00:00:00 2001 From: moklick Date: Mon, 15 May 2023 11:11:47 +0200 Subject: [PATCH 2/2] chore(changeset): add --- .changeset/poor-baboons-brake.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/poor-baboons-brake.md diff --git a/.changeset/poor-baboons-brake.md b/.changeset/poor-baboons-brake.md new file mode 100644 index 00000000..ab695a10 --- /dev/null +++ b/.changeset/poor-baboons-brake.md @@ -0,0 +1,5 @@ +--- +'@reactflow/controls': patch +--- + +fix(icons): show correct lock icon