frontend/components/ui/alert/Alert.vue

22 lines
478 B
Vue
Raw Normal View History

<script setup lang="ts">
import type { HTMLAttributes } from "vue";
2025-06-26 22:39:02 +02:00
import { cn } from "@/lib/utils";
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"];
}>();
</script>
<template>
<div
data-slot="alert"
2025-04-10 14:48:03 +02:00
:class="cn(alertVariants({ variant, layout }), props.class)"
role="alert"
>
<slot />
</div>
</template>