I have a component that shows a custom tooltip whether or not the text is truncated. This is a stateless component.
const TitleComponent = ({ value }) => {
const name = value.name;
return(
<div className="header">
<span className="area">
<Tooltip
value={name}
position={Position.bottom}>
<span className="truncate headerTruncate">
{name}
</span>
</Tooltip>
</span>
</div>
);
};
So the text is truncated by the 'trancate' CSS class. And I want a way to only show the tooltip when text is truncated. How do I even know the whether or not the text is truncated in the code?