import { useDialog } from '@react-aria/dialog'; import { useOverlay } from '@react-aria/overlays'; import React, { createRef } from 'react'; import { VizTooltipContainer } from '@grafana/ui'; import { ComplexDataHoverView } from './components/ComplexDataHoverView'; import { GeomapHoverPayload } from './event'; interface Props { ttip?: GeomapHoverPayload; isOpen: boolean; onClose: () => void; } export const GeomapTooltip = ({ ttip, onClose, isOpen }: Props) => { const ref = createRef(); const { overlayProps } = useOverlay({ onClose, isDismissable: true, isOpen }, ref); const { dialogProps } = useDialog({}, ref); return ( <> {ttip && ttip.layers && (
)} ); };