diff --git a/components/Tooltip.tsx b/components/Tooltip.tsx deleted file mode 100644 index 9db17a76..00000000 --- a/components/Tooltip.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import React, { useRef } from 'react' -import { useTooltipTriggerState } from '@react-stately/tooltip' -import { mergeProps } from '@react-aria/utils' -import { useTooltip, useTooltipTrigger } from '@react-aria/tooltip' - -function TooltipContent({ state, ...props }) { - const { tooltipProps } = useTooltip(props, state) - - return ( - - {props.children} - - ) -} - -export default function Tooltip(props) { - const state = useTooltipTriggerState(props) - const ref = useRef() - - console.log('content', props.content) - - const { triggerProps, tooltipProps } = useTooltipTrigger(props, state, ref) - - return ( - - - {/* {React.cloneElement(props.children, { ref, ...triggerProps })} */} - {state.isOpen && ( - - {props.content} - - )} - - ) -}