feat: add alert component suite for improved user notifications
- Introduced Alert, AlertDescription, and AlertTitle components to enhance user notification capabilities. - Implemented alertVariants for customizable alert styles based on different variants. - Added TypeScript support for props in each component, ensuring type safety and better integration. These changes provide a structured approach to displaying alerts, improving user experience and flexibility in notifications.
This commit is contained in:
parent
1a5eee57cb
commit
5a59f7ce89
4 changed files with 79 additions and 0 deletions
17
src/components/ui/alert/AlertTitle.vue
Normal file
17
src/components/ui/alert/AlertTitle.vue
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from "vue"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const props = defineProps<{
|
||||
class?: HTMLAttributes["class"]
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
data-slot="alert-title"
|
||||
:class="cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', props.class)"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
Loading…
Add table
Add a link
Reference in a new issue