Using teleport for tooltips. Moved theme class to body tag with UI observer.
This commit is contained in:
@@ -4,24 +4,34 @@
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
<div class="tooltip">
|
||||
<div class="tooltip-wrapper">
|
||||
<slot name="popover" />
|
||||
<teleport to="body">
|
||||
<div class="tooltip">
|
||||
<div class="tooltip-wrapper">
|
||||
<slot name="tooltip" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</teleport>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.tooltip-container {
|
||||
position: relative;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.tooltip-frame {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
top: 2rem;
|
||||
background: var(--background);
|
||||
background: var(--background-light);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user