feat: migrate Modal Popover and Tooltip with shared overlay foundation
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
Button,
|
||||
Popover,
|
||||
PopoverContent,
|
||||
PopoverDialog,
|
||||
PopoverHeading,
|
||||
} from "@heroui-vue/components";
|
||||
</script>
|
||||
<template>
|
||||
<Popover>
|
||||
<Button variant="secondary">详情</Button>
|
||||
<PopoverContent
|
||||
class="max-w-56 overflow-hidden rounded-xl border border-border/80 bg-surface/90 p-0 shadow-xl ring-1 ring-black/5 backdrop-blur-xl dark:border-border/90 dark:bg-surface/85 dark:ring-white/10"
|
||||
>
|
||||
<PopoverDialog class="relative p-4">
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="pointer-events-none absolute inset-x-0 top-0 h-12 bg-linear-to-b from-neutral-500/6 to-transparent dark:from-neutral-400/8"
|
||||
></div>
|
||||
<PopoverHeading
|
||||
class="relative font-medium text-neutral-800 dark:text-neutral-100"
|
||||
>
|
||||
键盘快捷键
|
||||
</PopoverHeading>
|
||||
<dl class="relative mt-3 space-y-2 text-sm">
|
||||
<div class="flex justify-between gap-4">
|
||||
<dt class="text-muted">保存</dt>
|
||||
<dd class="font-mono text-neutral-700 dark:text-neutral-300">
|
||||
⌘ S
|
||||
</dd>
|
||||
</div>
|
||||
<div class="flex justify-between gap-4">
|
||||
<dt class="text-muted">搜索</dt>
|
||||
<dd class="font-mono text-neutral-700 dark:text-neutral-300">
|
||||
⌘ K
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</PopoverDialog>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
</template>
|
||||
Reference in New Issue
Block a user