diff --git a/packages/ui/src/components/tooltip.tsx b/packages/ui/src/components/tooltip.tsx index b55265b79..055e50465 100644 --- a/packages/ui/src/components/tooltip.tsx +++ b/packages/ui/src/components/tooltip.tsx @@ -1,5 +1,5 @@ import { Tooltip as KobalteTooltip } from "@kobalte/core/tooltip" -import { children, createSignal, Match, onMount, splitProps, Switch, type JSX } from "solid-js" +import { createSignal, Match, splitProps, Switch, type JSX } from "solid-js" import type { ComponentProps } from "solid-js" export interface TooltipProps extends ComponentProps { @@ -40,32 +40,16 @@ export function Tooltip(props: TooltipProps) { "contentStyle", "inactive", "forceOpen", + "value", ]) - const c = children(() => local.children) - - onMount(() => { - const childElements = c() - if (childElements instanceof HTMLElement) { - childElements.addEventListener("focusin", () => setOpen(true)) - childElements.addEventListener("focusout", () => setOpen(false)) - } else if (Array.isArray(childElements)) { - for (const child of childElements) { - if (child instanceof HTMLElement) { - child.addEventListener("focusin", () => setOpen(true)) - child.addEventListener("focusout", () => setOpen(false)) - } - } - } - }) - return ( {local.children} - {c()} + {local.children} - {others.value} + {local.value} {/* */}