diff --git a/src/components/ui/Tooltip.tsx b/src/components/ui/Tooltip.tsx index f53177a5..d18762bd 100644 --- a/src/components/ui/Tooltip.tsx +++ b/src/components/ui/Tooltip.tsx @@ -15,7 +15,6 @@ import { useHover, useInteractions, useRole, - useTransitionStyles, } from "@floating-ui/react" import { cn } from "~/lib/utils" @@ -39,12 +38,13 @@ export const Tooltip = ({ }: Props) => { const [open, setOpen] = useState(false) - const { x, y, refs, strategy, context } = useFloating({ + const { floatingStyles, refs, context } = useFloating({ placement, open, onOpenChange: setOpen, middleware: [offset(5), flip(), shift({ padding: 8 })], whileElementsMounted: autoUpdate, + transform: false, }) const { getReferenceProps, getFloatingProps } = useInteractions([ @@ -54,12 +54,8 @@ export const Tooltip = ({ useDismiss(context), ]) - const { isMounted, styles } = useTransitionStyles(context, { - duration: 100, - }) - return ( -
+ <>
- {isMounted && ( + {open && ( )} -
+ ) }