docs: fixed tooltip causing overflow in codeblocks (#2679)

This commit is contained in:
Shahed Nasser
2022-11-28 11:03:11 +02:00
committed by GitHub
parent 6aee2e2265
commit 2db038cd82
3 changed files with 12 additions and 10 deletions

View File

@@ -4,17 +4,17 @@ export default function Tooltip ({ children, text, tooltipClassName, ...rest })
const [show, setShow] = React.useState(false);
return (
<div className={`tooltip-container ${tooltipClassName || ''}`}>
<div className={show ? 'tooltip-box visible' : 'tooltip-box'}>
<span className={`tooltip-container ${tooltipClassName || ''}`}>
<span className={show ? 'tooltip-box visible' : 'tooltip-box'}>
{text}
</div>
<div
</span>
<span
onMouseEnter={() => setShow(true)}
onMouseLeave={() => setShow(false)}
{...rest}
>
{children}
</div>
</div>
</span>
</span>
);
};