feat: add keyboard shortcut tooltips

This commit is contained in:
Zoe
2026-03-02 13:41:57 -06:00
parent 579f4730c8
commit e2a4643419
16 changed files with 217 additions and 53 deletions
+20
View File
@@ -0,0 +1,20 @@
<script setup lang="ts">
const props = defineProps<{
hotkey?: string[];
}>();
const { show, hide } = useTooltip();
const triggerRef = ref<HTMLElement | null>(null);
const onMouseEnter = () => {
if (triggerRef.value) {
show(triggerRef.value, props.hotkey);
}
};
</script>
<template>
<div ref="triggerRef" @mouseenter="onMouseEnter" @mouseleave="hide" :class="$attrs.class" v-bind="$attrs">
<slot />
</div>
</template>