alert-dialog
Small size alert dialog with media (icon)
Small size alert dialog with media (icon)
Загрузка превью…
src/alert-dialog/c-alert-dialog-4.vue
<!-- Иконка внутри AlertDialogMedia не монтируется в закрытом состоянии; см. c-alert-dialog-3.vue. -->
<script setup lang="ts">
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogTitle, AlertDialogTrigger } from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
</script>
<template>
<AlertDialog>
<AlertDialogTrigger as-child>
<Button variant="outline">Small (Media)</Button>
</AlertDialogTrigger>
<AlertDialogContent size="sm">
<AlertDialogHeader>
<AlertDialogMedia>
<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"
><path d="m7 7 10 10-5 5V2l5 5L7 17" /></svg>
</AlertDialogMedia>
<AlertDialogTitle>Allow accessory to connect?</AlertDialogTitle>
<AlertDialogDescription>
Do you want to allow the USB accessory to connect to this device?
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Don't allow</AlertDialogCancel>
<AlertDialogAction>Allow</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</template>
Установка
npx shadcn-vue@latest add https://revueui.rootapi.dev/r/c-alert-dialog-4.jsonЗависимости реестра
Источник: порт из ReUI (Keenthemes, MIT)