alert-dialog
Logout confirmation dialog
Logout confirmation dialog
Загрузка превью…
src/alert-dialog/c-alert-dialog-13.vue
<!-- Иконка внутри AlertDialogMedia не монтируется в закрытом состоянии; путь lucide "shield-question-mark". -->
<script setup lang="ts">
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogMedia, AlertDialogTitle, AlertDialogTrigger } from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
</script>
<template>
<AlertDialog>
<AlertDialogTrigger as-child>
<Button variant="outline">Logout</Button>
</AlertDialogTrigger>
<AlertDialogContent size="sm" class="gap-0 overflow-hidden p-0 sm:max-w-sm">
<div class="flex flex-col items-center justify-center gap-2 p-8">
<AlertDialogMedia class="rounded-full size-12 bg-violet-50 text-violet-500 dark:bg-violet-950 dark:text-violet-400">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="size-6"
><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" /><path d="M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3" /><path d="M12 17h.01" /></svg>
</AlertDialogMedia>
<AlertDialogTitle class="text-center text-base font-semibold">Are you sure?</AlertDialogTitle>
<AlertDialogDescription class="p-0 text-center text-sm font-medium">
You can always log in later to your account.
</AlertDialogDescription>
</div>
<AlertDialogFooter class="grid flex-none grid-cols-2 gap-0 divide-x border-t pt-0">
<AlertDialogCancel variant="ghost" class="border-border h-12 flex-1 rounded-none border-0 border-r p-0">
No
</AlertDialogCancel>
<AlertDialogAction variant="ghost" class="h-12 flex-1 rounded-none border-0 p-0">
Yes, Logout
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</template>
Установка
npx shadcn-vue@latest add https://revueui.rootapi.dev/r/c-alert-dialog-13.jsonЗависимости реестра
Источник: порт из ReUI (Keenthemes, MIT)