From 7faf64552d3e5fc0f8e371d9a10d4999e0dd195f Mon Sep 17 00:00:00 2001 From: Marshall Polaris Date: Sat, 27 Aug 2022 00:55:45 -0700 Subject: [PATCH] Clean up tooltip markup --- web/components/tooltip.tsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/web/components/tooltip.tsx b/web/components/tooltip.tsx index ef8f5bb8..4dd1f6e2 100644 --- a/web/components/tooltip.tsx +++ b/web/components/tooltip.tsx @@ -11,7 +11,6 @@ import { useRole, } from '@floating-ui/react-dom-interactions' import { Transition } from '@headlessui/react' -import clsx from 'clsx' import { ReactNode, useRef, useState } from 'react' // See https://floating-ui.com/docs/react-dom @@ -58,14 +57,10 @@ export function Tooltip(props: { }[placement.split('-')[0]] as string return text ? ( -
-
+ <> + {children} -
+ {/* conditionally render tooltip and fade in/out */} -
+ ) : ( <>{children} )