Label tooltip

This commit is contained in:
ernstmul
2024-12-31 06:53:43 +01:00
parent 901b5ae862
commit fae756e078
+5 -7
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { tooltip as tooltipAction } from '$lib/actions/tooltip';
import { Tooltip } from '@appwrite.io/pink-svelte';
interface $$Props extends Partial<HTMLLabelElement> {
required?: boolean;
@@ -31,12 +32,9 @@
{/if}
{#if tooltip}
<button
type="button"
on:click|preventDefault
class="tooltip"
aria-label="input tooltip"
use:tooltipAction={{ content: tooltip, appendTo: 'parent' }}>
<Tooltip>
<span class="icon-info" aria-hidden="true" style="font-size: var(--icon-size-small)" />
</button>
<p slot="tooltip">{tooltip}</p>
</Tooltip>
{/if}