import Tippy, { useSingleton, TippyProps } from "@tippyjs/react"; import * as React from "react"; import { roundArrow } from "tippy.js"; export const TooltipContext = React.createContext(undefined); export function useTooltipContext() { return React.useContext(TooltipContext); } type Props = { children: React.ReactNode; /** Props to pass to the Tippy component */ tippyProps?: TippyProps; }; /** * Wrap a collection of tooltips in a provider to allow them to share the same singleton instance. */ export function TooltipProvider({ children, tippyProps }: Props) { const [source, target] = useSingleton(); return ( <> {children} ); }