🎨 style(GenericNode): refactor tooltip to improve accessibility and user experience

The tooltip now includes a link to the documentation of the node, which makes it more accessible and user-friendly. The link is now wrapped in the tooltip title, which improves the semantics of the code.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-25 21:32:48 -03:00
commit 7d415e62df

View file

@ -116,14 +116,18 @@ export default function GenericNode({
<div className="flex gap-3">
<div className=" px-5 pb-3 mr-5">
{data.node.documentation !== "" && (
<Tooltip title={`Open ${data.node.display_name} documentation`}>
<a
href={data.node.documentation}
target="_blank"
rel="noopener noreferrer"
>
<Info />
</a>
<Tooltip
title={
<a
href={data.node.documentation}
target="_blank"
rel="noopener noreferrer"
>
{`Open ${data.node.display_name} documentation`}
</a>
}
>
<Info />
</Tooltip>
)}
</div>