🐛 fix(parameterComponent): fix styling issue in tooltip and icon rendering in ParameterComponent
This commit is contained in:
parent
80efed1d91
commit
3f0cc57cd5
1 changed files with 44 additions and 37 deletions
|
|
@ -100,24 +100,32 @@ export default function ParameterComponent({
|
||||||
const groupedObj = groupByFamily(myData, tooltipTitle, left, data.type);
|
const groupedObj = groupByFamily(myData, tooltipTitle, left, data.type);
|
||||||
|
|
||||||
refHtml.current = groupedObj.map((item, i) => {
|
refHtml.current = groupedObj.map((item, i) => {
|
||||||
|
const Icon: any = nodeIconsLucide[item.family];
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
key={getRandomKeyByssmm() + item.family + i}
|
key={getRandomKeyByssmm() + item.family + i}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
i > 0 ? "mt-3 flex items-center" : "flex items-center"
|
i > 0 ? "mt-2 flex items-center" : "flex items-center"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="h-6 w-6"
|
className="h-5 w-5"
|
||||||
style={{
|
style={{
|
||||||
color: nodeColors[item.family],
|
color: nodeColors[item.family],
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{React.createElement(nodeIconsLucide[item.family])}
|
<Icon
|
||||||
|
className="h-5 w-5"
|
||||||
|
|
||||||
|
strokeWidth={1.5}
|
||||||
|
style={{
|
||||||
|
color: nodeColors[item.family] ?? nodeColors.unknown,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span className="ps-2 text-foreground">
|
<span className="ps-2 text-xs text-foreground">
|
||||||
{nodeNames[item.family] ?? ""}{" "}
|
{nodeNames[item.family] ?? ""}{" "}
|
||||||
<span>
|
<span className="text-xs">
|
||||||
{" "}
|
{" "}
|
||||||
-
|
-
|
||||||
{item.type.split(", ").length > 2
|
{item.type.split(", ").length > 2
|
||||||
|
|
@ -136,7 +144,6 @@ export default function ParameterComponent({
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
}, [tooltipTitle]);
|
}, [tooltipTitle]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -174,7 +181,7 @@ export default function ParameterComponent({
|
||||||
<></>
|
<></>
|
||||||
) : (
|
) : (
|
||||||
<ShadTooltip
|
<ShadTooltip
|
||||||
style="max-w-[40vw] max-h-[10vh] overflow-auto custom-scroll"
|
style="max-w-[30vw] max-h-[20vh] overflow-auto custom-scroll"
|
||||||
delayDuration={0}
|
delayDuration={0}
|
||||||
content={refHtml.current}
|
content={refHtml.current}
|
||||||
side={left ? "left" : "right"}
|
side={left ? "left" : "right"}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue