aboutsummaryrefslogtreecommitdiff
path: root/src/components/popover/popover.vue
diff options
context:
space:
mode:
authorSean King <seanking2919@protonmail.com>2022-08-07 06:38:56 +0000
committerSean King <seanking2919@protonmail.com>2022-08-07 06:38:56 +0000
commit572f28d7c9efea4300cb88063baf4daab91e7910 (patch)
tree29d966a1b7141f6a768120497d3f34143f467212 /src/components/popover/popover.vue
parent18d69f93d38dc15a74db81ee4c10b4766bebfc35 (diff)
parent6a2f4270727913b8e5d4670b5b3bbc3f57f51ec5 (diff)
Merge branch 'fix/merge-conflicts/report-notifications' into 'feat/report-notification'
Fixing merge conflicts and lint for report notifications MR See merge request pleroma/pleroma-fe!1585
Diffstat (limited to 'src/components/popover/popover.vue')
-rw-r--r--src/components/popover/popover.vue48
1 files changed, 28 insertions, 20 deletions
diff --git a/src/components/popover/popover.vue b/src/components/popover/popover.vue
index c2a3e801..bd59cade 100644
--- a/src/components/popover/popover.vue
+++ b/src/components/popover/popover.vue
@@ -1,5 +1,5 @@
<template>
- <div
+ <span
@mouseenter="onMouseenter"
@mouseleave="onMouseleave"
>
@@ -11,20 +11,27 @@
>
<slot name="trigger" />
</button>
- <div
- v-if="!hidden"
- ref="content"
- :style="styles"
- class="popover"
- :class="popoverClass || 'popover-default'"
- >
- <slot
- name="content"
- class="popover-inner"
- :close="hidePopover"
- />
- </div>
- </div>
+ <teleport to="#popovers">
+ <transition name="fade">
+ <div
+ v-if="!hidden"
+ ref="content"
+ :style="styles"
+ class="popover"
+ :class="popoverClass || 'popover-default'"
+ @mouseenter="onMouseenterContent"
+ @mouseleave="onMouseleaveContent"
+ @click="onClickContent"
+ >
+ <slot
+ name="content"
+ class="popover-inner"
+ :close="hidePopover"
+ />
+ </div>
+ </transition>
+ </teleport>
+ </span>
</template>
<script src="./popover.js" />
@@ -37,14 +44,15 @@
}
.popover {
- z-index: 500;
- position: absolute;
+ z-index: var(--ZI_popover_override, var(--ZI_popovers));
+ position: fixed;
min-width: 0;
+ max-width: calc(100vw - 20px);
+ box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);
+ box-shadow: var(--popupShadow);
}
.popover-default {
- transition: opacity 0.3s;
-
&:after {
content: '';
position: absolute;
@@ -80,7 +88,7 @@
text-align: left;
list-style: none;
max-width: 100vw;
- z-index: 200;
+ z-index: var(--ZI_popover_override, var(--ZI_popovers));
white-space: nowrap;
.dropdown-divider {