Files
heroui-vue/apps/docs/demos/alert-dialog-custom-icon.vue
T

50 lines
1.5 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
import { IconLockOpen } from "@tabler/icons-vue";
import {
AlertDialog,
AlertDialogBackdrop,
AlertDialogBody,
AlertDialogClose,
AlertDialogCloseTrigger,
AlertDialogContainer,
AlertDialogDialog,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogHeading,
AlertDialogIcon,
Button,
} from "@heroui-vue/components";
</script>
<template>
<AlertDialog>
<Button variant="secondary">重置密码</Button>
<AlertDialogBackdrop>
<AlertDialogContainer>
<AlertDialogDialog class="sm:max-w-[400px]">
<AlertDialogCloseTrigger />
<AlertDialogHeader>
<AlertDialogIcon status="warning">
<IconLockOpen class="size-5" aria-hidden="true" />
</AlertDialogIcon>
<AlertDialogHeading>要重置密码吗?</AlertDialogHeading>
</AlertDialogHeader>
<AlertDialogBody>
<p>
我们会向你的邮箱发送重置链接。你需要设置新密码以恢复账户访问。
</p>
</AlertDialogBody>
<AlertDialogFooter>
<AlertDialogClose as-child>
<Button variant="tertiary">取消</Button>
</AlertDialogClose>
<AlertDialogClose as-child>
<Button>发送重置链接</Button>
</AlertDialogClose>
</AlertDialogFooter>
</AlertDialogDialog>
</AlertDialogContainer>
</AlertDialogBackdrop>
</AlertDialog>
</template>