diff --git a/frontend/views/components/Tooltip.vue b/frontend/views/components/Tooltip.vue
index 949f234b8..778444c9d 100644
--- a/frontend/views/components/Tooltip.vue
+++ b/frontend/views/components/Tooltip.vue
@@ -1,28 +1,40 @@
span.c-twrapper(
- :class='{ "has-target-within": triggerElementSelector }'
+ :class='{ "has-target-within": triggerElementSelector, "anchored-to-element": anchorToElement }'
v-bind='rootElAttrs'
)
slot
- transition(name='fade')
- .c-background(
- v-if='(isActive || isVisible) && manual'
- @click='toggle'
- v-append-to-body=''
- data-test='closeProfileCard'
+ template(v-if='revealTooltip')
+ .c-anchored-tooltip(
+ v-if='anchorToElement'
+ :class='tooltipClasses'
+ :style='styles'
+ v-anchor-to-trigger=''
)
+ // Default tooltip is text
+ template(v-if='text') {{text}}
+ // But any content can fit in
+ slot(v-else='' name='tooltip')
- .c-tooltip(
- :style='styles'
- :class='{"has-text-center": isTextCenter, "is-active": isActive, manual, "is-dark-theme": $store.getters.isDarkTheme, "in-reduced-motion": isReducedMotionMode }'
- v-if='isActive || isVisible'
- v-append-to-body='{ manual }'
- )
- // Default tooltip is text
- template(v-if='text') {{text}}
- // But any content can fit in
- slot(v-else='' name='tooltip')
+ template(v-else)
+ transition(name='fade')
+ .c-background(
+ v-if='manual'
+ @click='toggle'
+ v-append-to-body=''
+ data-test='closeProfileCard'
+ )
+
+ .c-tooltip(
+ :style='styles'
+ :class='tooltipClasses'
+ v-append-to-body='{ manual }'
+ )
+ // Default tooltip is text
+ template(v-if='text') {{text}}
+ // But any content can fit in
+ slot(v-else='' name='tooltip')