fix: removed gradient from icon when component is tool mode (#7929)
removed gradient from tool mode components
This commit is contained in:
parent
8cabedae55
commit
4f36583601
2 changed files with 3 additions and 16 deletions
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue