aboutsummaryrefslogtreecommitdiff
path: root/src/components/popover/popover.vue
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2022-06-12 16:31:56 +0300
committerHenry Jameson <me@hjkos.com>2022-06-12 16:31:56 +0300
commit55adcd822e194be8aaeb9d6b649de90e9d5e1e45 (patch)
tree72e1fca502676e526e2dccc5dd2e308414c3829f /src/components/popover/popover.vue
parent61d63b0e616392d841b78095ae8045e98d2b2fa6 (diff)
fix animations, replace ugly old mentionlink tooltips with new usercard ones
Diffstat (limited to 'src/components/popover/popover.vue')
-rw-r--r--src/components/popover/popover.vue36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/components/popover/popover.vue b/src/components/popover/popover.vue
index 6103fbdc..528c4fb2 100644
--- a/src/components/popover/popover.vue
+++ b/src/components/popover/popover.vue
@@ -1,5 +1,5 @@
<template>
- <div
+ <span
@mouseenter="onMouseenter"
@mouseleave="onMouseleave"
>
@@ -12,21 +12,25 @@
<slot name="trigger" />
</button>
<teleport to="#popovers">
- <div
- v-if="!hidden"
- ref="content"
- :style="styles"
- class="popover"
- :class="popoverClass || 'popover-default'"
- >
- <slot
- name="content"
- class="popover-inner"
- :close="hidePopover"
- />
- </div>
+ <transition name="fade">
+ <div
+ v-if="!hidden"
+ ref="content"
+ :style="styles"
+ class="popover"
+ :class="popoverClass || 'popover-default'"
+ @mouseenter="onMouseenterContent"
+ @mouseleave="onMouseleaveContent"
+ >
+ <slot
+ name="content"
+ class="popover-inner"
+ :close="hidePopover"
+ />
+ </div>
+ </transition>
</teleport>
- </div>
+ </span>
</template>
<script src="./popover.js" />
@@ -47,8 +51,6 @@
}
.popover-default {
- transition: opacity 0.3s;
-
&:after {
content: '';
position: absolute;