feat: migrate Modal Popover and Tooltip with shared overlay foundation
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
Button,
|
||||
Popover,
|
||||
PopoverArrow,
|
||||
PopoverContent,
|
||||
PopoverDialog,
|
||||
PopoverHeading,
|
||||
} from "@heroui-vue/components";
|
||||
import { IconDots as Ellipsis } from "@tabler/icons-vue";
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex items-center gap-4">
|
||||
<Popover>
|
||||
<Button variant="secondary">带箭头</Button>
|
||||
<PopoverContent class="max-w-64">
|
||||
<PopoverDialog>
|
||||
<PopoverArrow></PopoverArrow>
|
||||
<PopoverHeading>带箭头的弹出层</PopoverHeading>
|
||||
<p class="mt-2 text-sm text-muted">箭头指向触发弹出层的元素。</p>
|
||||
</PopoverDialog>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
<Popover>
|
||||
<Button isIconOnly aria-label="更多选项" variant="tertiary">
|
||||
<Ellipsis aria-hidden="true"></Ellipsis>
|
||||
</Button>
|
||||
<PopoverContent class="max-w-64" :offset="10">
|
||||
<PopoverDialog>
|
||||
<PopoverArrow></PopoverArrow>
|
||||
<PopoverHeading>带箭头的弹出层</PopoverHeading>
|
||||
<p class="mt-2 text-sm text-muted">箭头指向触发弹出层的元素。</p>
|
||||
</PopoverDialog>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user