Merge pull request #3054 from wbkd/fix/controls-lock
fix(controls): show correct icon for interactivity button
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@reactflow/controls': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(icons): show correct lock icon
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
import { memo, useEffect, useState } from 'react';
|
import { memo, useEffect, useState, type FC, type PropsWithChildren } from 'react';
|
||||||
import type { FC, PropsWithChildren } from 'react';
|
|
||||||
import cc from 'classcat';
|
import cc from 'classcat';
|
||||||
import { useStore, useStoreApi, useReactFlow, Panel } from '@reactflow/core';
|
import { useStore, useStoreApi, useReactFlow, Panel, type ReactFlowState } from '@reactflow/core';
|
||||||
import type { ReactFlowState } from '@reactflow/core';
|
|
||||||
|
|
||||||
import PlusIcon from './Icons/Plus';
|
import PlusIcon from './Icons/Plus';
|
||||||
import MinusIcon from './Icons/Minus';
|
import MinusIcon from './Icons/Minus';
|
||||||
@@ -13,7 +11,7 @@ import ControlButton from './ControlButton';
|
|||||||
|
|
||||||
import type { ControlProps } from './types';
|
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>> = ({
|
const Controls: FC<PropsWithChildren<ControlProps>> = ({
|
||||||
style,
|
style,
|
||||||
|
|||||||
Reference in New Issue
Block a user