2024-12-03 12:30:10 +01:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import type { HTMLAttributes } from "vue";
|
2025-06-26 22:39:02 +02:00
|
|
|
import { cn } from "@/lib/utils";
|
2024-12-03 12:30:10 +01:00
|
|
|
import { type AlertVariants, alertVariants } from ".";
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
class?: HTMLAttributes["class"];
|
|
|
|
|
variant?: AlertVariants["variant"];
|
|
|
|
|
}>();
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-04-10 13:55:56 +02:00
|
|
|
<div
|
|
|
|
|
data-slot="alert"
|
2025-11-21 12:16:00 +01:00
|
|
|
:class="cn(alertVariants({ variant }), props.class)"
|
2025-04-10 13:55:56 +02:00
|
|
|
role="alert"
|
|
|
|
|
>
|
2024-12-03 12:30:10 +01:00
|
|
|
<slot />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|