Skip to content

Commit da7379c

Browse files
committed
fix: tooltip conflict with mouseover changes
1 parent b8c211c commit da7379c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/components/IconButton.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
<template>
2-
<b-button
3-
v-b-tooltip.body="{ title: tooltipTitle, placement: tooltipPlacement }"
4-
:to="to"
5-
v-bind="buttonProps"
6-
class="icon-button"
7-
:class="classList"
8-
@mouseenter="currentHover = true"
9-
@mouseleave="currentHover = false"
10-
>
2+
<b-button v-bind="buttonProps" ref="iconButton" :to="to" class="icon-button" :class="classList">
113
<slot name="start" />
124
<phosphor-icon
135
v-if="iconLeft || (!iconLeft && !iconRight && loading)"
@@ -35,13 +27,22 @@
3527
class="icon-button__icon-right"
3628
/>
3729
<slot name="end" />
30+
<b-tooltip
31+
v-model="currentHover"
32+
teleport-to="body"
33+
:placement="tooltipPlacement"
34+
:target="iconButton"
35+
:title="tooltipTitle"
36+
/>
3837
</b-button>
3938
</template>
4039

4140
<script setup>
4241
import { computed, ref } from 'vue'
4342
import { PhosphorIcon } from '@icij/murmur-next'
4443
44+
const iconButton = ref(null)
45+
4546
const props = defineProps({
4647
iconLeft: {
4748
type: String,

0 commit comments

Comments
 (0)