Fixed icon not colorful on nodes
This commit is contained in:
parent
7638ee9547
commit
9ed9a9dd49
2 changed files with 11 additions and 6 deletions
|
|
@ -8,14 +8,19 @@ const ForwardedIconComponent = forwardRef(
|
||||||
ref
|
ref
|
||||||
) => {
|
) => {
|
||||||
const TargetIcon = nodeIconsLucide[name] ?? nodeIconsLucide["unknown"];
|
const TargetIcon = nodeIconsLucide[name] ?? nodeIconsLucide["unknown"];
|
||||||
|
|
||||||
|
const style = {
|
||||||
|
strokeWidth: 1.5,
|
||||||
|
className: className,
|
||||||
|
...(stroke && { stroke: stroke }),
|
||||||
|
...(iconColor && { color: iconColor, stroke: stroke }),
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TargetIcon
|
<TargetIcon
|
||||||
strokeWidth={1.5}
|
style={style}
|
||||||
className={className}
|
|
||||||
style={iconColor ? { color: iconColor } : {}}
|
|
||||||
ref={ref}
|
ref={ref}
|
||||||
stroke={stroke ? stroke : "currentColor"}
|
data-testid={id ? `${id}-${name}` : `icon-${name}`}
|
||||||
data-testid={id ? `${id}-${name}` : "icon-" + name}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue