alert

Alert with icon and action buttons

Alert with icon and action buttons

Загрузка превью…

src/alert/c-alert-3.vue

<script setup lang="ts">
import { Alert, AlertAction, AlertDescription, AlertTitle } from "@/components/reui/alert"
import { Button } from "@/components/ui/button"
</script>

<template>
  <Alert>
    <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"
      aria-hidden="true"
      class="lucide lucide-shield-check"
    >
      <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 12 2 2 4-4" />
    </svg>
    <AlertTitle>Security Update</AlertTitle>
    <AlertDescription>Update your password and enable 2FA.</AlertDescription>
    <AlertAction>
      <Button variant="outline" size="xs">Dismiss</Button>
      <Button size="xs">Update</Button>
    </AlertAction>
  </Alert>
</template>

Установка

npx shadcn-vue@latest add https://revueui.rootapi.dev/r/c-alert-3.json

Зависимости реестра

Источник: порт из ReUI (Keenthemes, MIT)