Alert.vue 457 B

123456789101112131415161718192021
  1. <script setup lang="ts">
  2. import type { HTMLAttributes } from "vue"
  3. import type { AlertVariants } from "."
  4. import { cn } from '@/Packages/Shadcn/Lib/utils'
  5. import { alertVariants } from "."
  6. const props = defineProps<{
  7. class?: HTMLAttributes["class"]
  8. variant?: AlertVariants["variant"]
  9. }>()
  10. </script>
  11. <template>
  12. <div
  13. data-slot="alert"
  14. :class="cn(alertVariants({ variant }), props.class)"
  15. role="alert"
  16. >
  17. <slot />
  18. </div>
  19. </template>