-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add location tooltip to map controls
- Loading branch information
1 parent
3f685c8
commit 588120e
Showing
2 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<template> | ||
<v-chip label class="tooltip-chip"> | ||
<v-icon>mdi-information</v-icon> | ||
<v-menu | ||
v-model="opened" | ||
transition="slide-y-transition" | ||
:close-on-content-click="false" | ||
activator="parent" | ||
persistent | ||
no-click-animation | ||
> | ||
<div class="tooltip-chip px-3 py-2 my-2 elevation-1"> | ||
<div v-html="content" /> | ||
</div> | ||
</v-menu> | ||
</v-chip> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
interface Props { | ||
content: string | ||
} | ||
defineProps<Props>() | ||
const opened = ref(true) | ||
</script> | ||
|
||
<style scoped> | ||
.tooltip-chip { | ||
font-size: 0.825em; | ||
z-index: 1000; | ||
border-radius: 5px; | ||
backdrop-filter: blur(5px); | ||
background-color: rgba(var(--v-theme-surface), 0.8); | ||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); | ||
} | ||
</style> |