improve tooltip positioning
This commit is contained in:
parent
2abb3968dd
commit
8be3f91d8e
|
@ -1,6 +1,7 @@
|
|||
import React, { cloneElement, useState } from "react";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
import {
|
||||
flip,
|
||||
shift,
|
||||
useDismiss,
|
||||
useFloating,
|
||||
|
@ -21,7 +22,7 @@ export const Tooltip: React.FC<Props> = ({ text, children }) => {
|
|||
placement: "top",
|
||||
open: isOpen,
|
||||
onOpenChange: setIsOpen,
|
||||
middleware: [shift()],
|
||||
middleware: [shift(), flip()],
|
||||
});
|
||||
|
||||
const { getReferenceProps, getFloatingProps } = useInteractions([
|
||||
|
|
Loading…
Reference in New Issue
Block a user