Prevent hidden tooltip from covering click/hover

This commit is contained in:
Sinclair Chen 2022-08-12 11:56:55 -07:00
parent 9d8a21653c
commit f5c7f0db0c

View File

@ -59,7 +59,7 @@ export function Tooltip(props: {
role="tooltip" role="tooltip"
ref={floating} ref={floating}
style={{ position: strategy, top: y ?? 0, left: x ?? 0 }} style={{ position: strategy, top: y ?? 0, left: x ?? 0 }}
className="z-10 max-w-xs rounded bg-slate-700 px-2 py-1 text-center text-sm text-white opacity-0 transition-opacity peer-hover:opacity-100 peer-focus:opacity-100" className="-z-10 max-w-xs rounded bg-slate-700 px-2 py-1 text-center text-sm text-white opacity-0 transition-opacity peer-hover:z-10 peer-hover:opacity-100 peer-focus:z-10 peer-focus:opacity-100"
> >
{text} {text}
<div <div