feat: migrate Modal Popover and Tooltip with shared overlay foundation
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
Button,
|
||||
Popover,
|
||||
PopoverArrow,
|
||||
PopoverContent,
|
||||
PopoverDialog,
|
||||
} from "@heroui-vue/components";
|
||||
</script>
|
||||
<template>
|
||||
<div class="grid grid-cols-3 gap-4">
|
||||
<div></div>
|
||||
<Popover>
|
||||
<Button class="w-full" variant="tertiary">Top</Button>
|
||||
<PopoverContent placement="top">
|
||||
<PopoverDialog>
|
||||
<PopoverArrow></PopoverArrow>
|
||||
<p class="text-sm">顶部位置</p>
|
||||
</PopoverDialog>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
<div></div>
|
||||
<Popover>
|
||||
<Button class="w-full" variant="tertiary">Left</Button>
|
||||
<PopoverContent placement="left">
|
||||
<PopoverDialog>
|
||||
<PopoverArrow></PopoverArrow>
|
||||
<p class="text-sm">左侧位置</p>
|
||||
</PopoverDialog>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
<div class="flex items-center justify-center">
|
||||
<span class="text-sm text-muted">点击按钮</span>
|
||||
</div>
|
||||
<Popover>
|
||||
<Button class="w-full" variant="tertiary">Right</Button>
|
||||
<PopoverContent placement="right">
|
||||
<PopoverDialog>
|
||||
<PopoverArrow></PopoverArrow>
|
||||
<p class="text-sm">右侧位置</p>
|
||||
</PopoverDialog>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
<div></div>
|
||||
<Popover>
|
||||
<Button class="w-full" variant="tertiary">Bottom</Button>
|
||||
<PopoverContent placement="bottom">
|
||||
<PopoverDialog>
|
||||
<PopoverArrow></PopoverArrow>
|
||||
<p class="text-sm">底部位置</p>
|
||||
</PopoverDialog>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
<div></div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user