feat(Tooltip): adding option to show popper arrow (#868)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Conner
2023-10-26 08:41:42 -05:00
committed by GitHub
parent 8ba2a791e4
commit 4ce23746da
8 changed files with 65 additions and 13 deletions

View File

@@ -6,17 +6,21 @@
<div v-if="open && !prevent" ref="container" :class="[ui.container, ui.width]">
<Transition appear v-bind="ui.transition">
<div :class="[ui.base, ui.background, ui.color, ui.rounded, ui.shadow, ui.ring]">
<slot name="text">
{{ text }}
</slot>
<div>
<div v-if="popper.arrow" data-popper-arrow :class="['invisible before:visible before:block before:rotate-45 before:z-[-1]', Object.values(ui.arrow)]" />
<span v-if="shortcuts?.length" :class="ui.shortcuts">
<span class="mx-1 text-gray-700 dark:text-gray-200">&middot;</span>
<UKbd v-for="shortcut of shortcuts" :key="shortcut" size="xs">
{{ shortcut }}
</Ukbd>
</span>
<div :class="[ui.base, ui.background, ui.color, ui.rounded, ui.shadow, ui.ring]">
<slot name="text">
{{ text }}
</slot>
<span v-if="shortcuts?.length" :class="ui.shortcuts">
<span class="mx-1 text-gray-700 dark:text-gray-200">&middot;</span>
<UKbd v-for="shortcut of shortcuts" :key="shortcut" size="xs">
{{ shortcut }}
</Ukbd>
</span>
</div>
</div>
</Transition>
</div>
@@ -127,6 +131,8 @@ export default defineComponent({
// eslint-disable-next-line vue/no-dupe-keys
ui,
attrs,
// eslint-disable-next-line vue/no-dupe-keys
popper,
trigger,
container,
open,