tooltipsssssssssss
All checks were successful
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m25s
All checks were successful
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m25s
This commit is contained in:
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>
|
||||
|
Reference in New Issue
Block a user