2024-04-19 16:13:08 +02:00
|
|
|
<script lang="ts">
|
2025-02-02 11:17:22 +01:00
|
|
|
import * as Tooltip from '$lib/components/ui/tooltip/index.js';
|
2024-04-21 16:40:28 +02:00
|
|
|
|
2025-02-02 11:17:22 +01:00
|
|
|
export let label: string;
|
|
|
|
export let side: 'top' | 'right' | 'bottom' | 'left' = 'top';
|
2024-04-19 16:13:08 +02:00
|
|
|
</script>
|
|
|
|
|
2025-06-21 21:07:36 +02:00
|
|
|
<Tooltip.Provider>
|
|
|
|
<Tooltip.Root>
|
|
|
|
<Tooltip.Trigger {...$$restProps} aria-label={label}>
|
|
|
|
<slot />
|
|
|
|
</Tooltip.Trigger>
|
|
|
|
<Tooltip.Content {side}>
|
|
|
|
<div class="flex flex-row items-center">
|
|
|
|
<span>{label}</span>
|
|
|
|
<slot name="extra" />
|
|
|
|
</div>
|
|
|
|
</Tooltip.Content>
|
|
|
|
</Tooltip.Root>
|
|
|
|
</Tooltip.Provider>
|