PronounsPage/components/Tooltip.vue
Valentyne Stigloher f24ced9f3f (fix) propagate properties to reference element of <Popover> (was wrong for german grammar tables)
ideally, there would be some auto-detection for the root of the provided slot, but apparently this isn’t easy to get
2024-10-06 22:59:27 +02:00

23 lines
370 B
Vue

<script setup lang="ts">
withDefaults(defineProps<{
text: string;
tag?: string;
}>(), {
tag: 'span',
});
</script>
<template>
<Popover
:tag="tag"
:title="text"
:aria-label="text"
placement="top"
>
<slot></slot>
<template #content>
{{ text }}
</template>
</Popover>
</template>