tooltipsssssssssss
All checks were successful
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m25s

This commit is contained in:
Lee 2024-10-23 16:44:08 +01:00
parent 0d12e7c024
commit 0731d20edc

@ -34,16 +34,16 @@ type Props = {
export default function Tooltip({ children, display, asChild = true, side = "top", className }: Props) {
const [open, setOpen] = useState(false);
const openDebounce = useDebounce(open, 100);
return (
<ShadCnTooltip open={openDebounce}>
<ShadCnTooltip open={open}>
<TooltipTrigger className={className} asChild={asChild}>
<div
className={cn("cursor-default", className)}
onMouseEnter={() => setOpen(true)}
onMouseLeave={() => setOpen(false)}
onTouchStart={() => setOpen(!open)}
onTouchEnd={() => setOpen(!open)}
>
{children}
</div>