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