Commit aaa332ca11
Unsigned
Layout: unified · split
docs/.vitepress/theme/components/Tooltip.vue +2 −12
| @@ -13,12 +13,9 @@ const isOpen = ref(false) | ||
| 13 | 13 | withDefaults( |
| 14 | 14 | defineProps<{ |
| 15 | 15 | title: string |
| 16 | icon: string | |
| 17 | 16 | }>(), |
| 18 | 17 | { |
| 19 | 18 | title: 'Info', |
| 20 | // https://icon-sets.iconify.design/material-symbols/ | |
| 21 | icon: 'i-material-symbols-help' | |
| 22 | 19 | } |
| 23 | 20 | ) |
| 24 | 21 | </script> |
| @@ -27,12 +24,9 @@ withDefaults( | ||
| 27 | 24 | <VTooltip theme="vp-tooltip" @show="isOpen = true" @hide="isOpen = false"> |
| 28 | 25 | <button |
| 29 | 26 | aria-label="Tooltip" |
| 30 | :class="[ | |
| 31 | 'text-$vp-custom-block-tip-text-deep size-3 p-0 select-none font-bold cursor-pointer', | |
| 32 | isOpen && 'tooltip-open-glow' | |
| 33 | ]" | |
| 27 | class="size-3 p-0 select-none font-bold cursor-pointer" style="color: #a8f0cc" | |
| 34 | 28 | > |
| 35 | <div :class="icon" /> | |
| 29 | <div :class="isOpen ? 'i-ic-twotone-add-circle' : 'i-ic-twotone-add-circle-outline'" /> | |
| 36 | 30 | </button> |
| 37 | 31 | |
| 38 | 32 | <template #popper> |
| @@ -90,8 +84,4 @@ withDefaults( | ||
| 90 | 84 | border-bottom: 1px solid var(--vp-c-divider); |
| 91 | 85 | } |
| 92 | 86 | |
| 93 | .tooltip-open-glow { | |
| 94 | filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 0 12px currentColor); | |
| 95 | transition: filter 0.2s ease; | |
| 96 | } | |
| 97 | 87 | </style> |
| \ No newline at end of file | ||