You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
472 B
21 lines
472 B
<script setup lang="ts">
|
|
import type { HTMLAttributes } from 'vue'
|
|
import type { AlertVariants } from '.'
|
|
import { cn } from '~/lib/utils'
|
|
import { alertVariants } from '.'
|
|
|
|
interface Props {
|
|
variant?: AlertVariants['variant']
|
|
class?: HTMLAttributes['class']
|
|
}
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
variant: 'default',
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div :class="cn(alertVariants({ variant }), props.class)" role="alert">
|
|
<slot />
|
|
</div>
|
|
</template>
|
|
|