Files
windmill/frontend/src/lib/components/TooltipInner.svelte
T
Ruben FiszelandClaude Opus 4.6 bd9ff03010 perf: lazy-load markdown in Tooltip components (#8143)
* perf: lazy-load markdown in Tooltip to reduce stores2 chunk by 335KB

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: migrate TooltipInner to Svelte 5 runes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* perf: remove markdown rendering from Tooltip components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use HTML tables for date format tooltips to preserve formatting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 08:52:10 +00:00

35 lines
808 B
Svelte

<script lang="ts">
import { ExternalLink } from 'lucide-svelte'
import { twMerge } from 'tailwind-merge'
interface Props {
documentationLink?: string | undefined
customBgClass?: string | undefined
children?: import('svelte').Snippet
}
let {
documentationLink = undefined,
customBgClass = undefined,
children
}: Props = $props()
</script>
<div
class={twMerge(
'shadow-lg max-w-sm break-words py-2 px-3 rounded-md text-xs font-normal text-primary whitespace-normal text-left dark:border max-h-64 overflow-y-auto',
customBgClass || 'bg-surface-secondary'
)}
>
{@render children?.()}
{#if documentationLink}
<a href={documentationLink} target="_blank">
<div class="flex flex-row gap-2 mt-4">
See documentation
<ExternalLink size="16" />
</div>
</a>
{/if}
</div>