Refactor: Add header to node tooltips

This commit is contained in:
igorrCarvalho 2023-09-11 15:50:18 -03:00
commit c18536d1ff

View file

@ -118,10 +118,17 @@ export default function ParameterComponent({
nodeIconsLucide[item.family] ?? nodeIconsLucide["unknown"]; nodeIconsLucide[item.family] ?? nodeIconsLucide["unknown"];
return ( return (
<>
{index === 0 && (
<span>
{left ? "Components to connect into:" : "Components to connect to:"}
</span>
)
}
<span <span
key={index} key={index}
className={classNames( className={classNames(
index > 0 ? "mt-2 flex items-center" : "flex items-center" index > 0 ? "mt-2 flex items-center" : "mt-3 flex items-center"
)} )}
> >
<div <div
@ -140,6 +147,7 @@ export default function ParameterComponent({
</div> </div>
<span className="ps-2 text-xs text-foreground"> <span className="ps-2 text-xs text-foreground">
{nodeNames[item.family] ?? "Other"} {nodeNames[item.family] ?? "Other"}
{" "}
<span className="text-xs"> <span className="text-xs">
{" "} {" "}
{item.type === "" ? "" : " - "} {item.type === "" ? "" : " - "}
@ -157,6 +165,7 @@ export default function ParameterComponent({
</span> </span>
</span> </span>
</span> </span>
</>
); );
}); });
} else { } else {