From 5f81af9c435ab5083cca78df53a092568eb1e3df Mon Sep 17 00:00:00 2001 From: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> Date: Fri, 6 Feb 2026 14:04:47 +0100 Subject: [PATCH] perf: remove forceMount from tooltip --- .../src/lib/components/Tooltip/Tooltip.svelte | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/packages/ui/src/lib/components/Tooltip/Tooltip.svelte b/packages/ui/src/lib/components/Tooltip/Tooltip.svelte index da59d30a..6e833f9b 100644 --- a/packages/ui/src/lib/components/Tooltip/Tooltip.svelte +++ b/packages/ui/src/lib/components/Tooltip/Tooltip.svelte @@ -2,7 +2,6 @@ import { zIndex } from '$lib/constants.js'; import { Tooltip } from 'bits-ui'; import type { Snippet } from 'svelte'; - import { fly } from 'svelte/transition'; type Props = Tooltip.RootProps & { text?: string | null; @@ -18,21 +17,30 @@ - {#snippet child({ wrapperProps, props, open })} - {#if open} -
-
- {text} -
-
- {/if} - {/snippet} + {text}
{:else} {@render child({ props: {} })} {/if} + +