Skip to content

Commit

Permalink
fix: tooltip conflict with mouseover changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pirhoo committed Jul 17, 2024
1 parent b8c211c commit da7379c
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/components/IconButton.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
<template>
<b-button
v-b-tooltip.body="{ title: tooltipTitle, placement: tooltipPlacement }"
:to="to"
v-bind="buttonProps"
class="icon-button"
:class="classList"
@mouseenter="currentHover = true"
@mouseleave="currentHover = false"
>
<b-button v-bind="buttonProps" ref="iconButton" :to="to" class="icon-button" :class="classList">
<slot name="start" />
<phosphor-icon
v-if="iconLeft || (!iconLeft && !iconRight && loading)"
Expand Down Expand Up @@ -35,13 +27,22 @@
class="icon-button__icon-right"
/>
<slot name="end" />
<b-tooltip
v-model="currentHover"
teleport-to="body"
:placement="tooltipPlacement"
:target="iconButton"
:title="tooltipTitle"
/>
</b-button>
</template>

<script setup>
import { computed, ref } from 'vue'
import { PhosphorIcon } from '@icij/murmur-next'
const iconButton = ref(null)
const props = defineProps({
iconLeft: {
type: String,
Expand Down

0 comments on commit da7379c

Please sign in to comment.