more ui components
This commit is contained in:
18
src/components/ui/UIAlert.vue
Normal file
18
src/components/ui/UIAlert.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
interface Props {
|
||||
color?: 'info' | 'success' | 'warning' | 'error'
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
color: 'info'
|
||||
})
|
||||
|
||||
const styleClass = computed(() => {
|
||||
const colorClass = `alert-${props.color}`
|
||||
return [colorClass]
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<div class="alert shadow-lg" :class="styleClass">
|
||||
<div><slot></slot></div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user