shadcn-vue/apps/www/src/lib/registry/default/examples/AlertDialogDemo.vue
zernonia 81197d1e02
feat: dialog, alertdialog (#9)
* feat: dialog

* feat: alert-dialog

* chore: add demo
2023-08-23 18:12:48 +08:00

38 lines
1.0 KiB
Vue

<script setup lang="ts">
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '@/registry/default/ui/alert-dialog'
import { Button } from '@/registry/default/ui/button'
</script>
<template>
<AlertDialog>
<AlertDialogTrigger as-child>
<Button variant="outline">
Show Dialog
</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
This action cannot be undone. This will permanently delete your
account and remove your data from our servers.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>Continue</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</template>