fix: removed gradient from icon when component is tool mode (#7929)

removed gradient from tool mode components
This commit is contained in:
Lucas Oliveira 2025-05-06 20:38:54 -03:00 committed by GitHub
commit 4f36583601
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 16 deletions

View file

@ -1,10 +1,5 @@
import { useTypesStore } from "@/stores/typesStore";
import {
BG_NOISE,
iconExists,
nodeColors,
toolModeGradient,
} from "@/utils/styleUtils";
import { iconExists, nodeColors } from "@/utils/styleUtils";
import emojiRegex from "emoji-regex";
import { useEffect, useState } from "react";
@ -18,13 +13,11 @@ export function NodeIcon({
dataType,
showNode,
isGroup,
hasToolMode,
}: {
icon?: string;
dataType: string;
showNode: boolean;
isGroup?: boolean;
hasToolMode: boolean;
}) {
const types = useTypesStore((state) => state.types);
const [name, setName] = useState(types[dataType]);
@ -46,8 +39,6 @@ export function NodeIcon({
isLucideIcon ? "lucide-icon" : "integration-icon",
);
const bgToolMode = BG_NOISE + "," + toolModeGradient;
const renderIcon = () => {
if (icon && isEmoji) {
return <span className="text-lg">{icon}</span>;
@ -57,13 +48,10 @@ export function NodeIcon({
return (
<div
className={cn(
hasToolMode ? "text-white" : "text-foreground",
"text-white",
!showNode && "flex min-h-8 min-w-8 items-center justify-center",
"bg-lucide-icon",
)}
style={{
backgroundImage: hasToolMode ? bgToolMode : "",
}}
>
<IconComponent
strokeWidth={ICON_STROKE_WIDTH}

View file

@ -361,10 +361,9 @@ function GenericNode({
showNode={showNode}
icon={data.node?.icon}
isGroup={!!data.node?.flow}
hasToolMode={hasToolMode ?? false}
/>
);
}, [data.type, showNode, data.node?.icon, data.node?.flow, hasToolMode]);
}, [data.type, showNode, data.node?.icon, data.node?.flow]);
const renderNodeName = useCallback(() => {
return (