more ui components

This commit is contained in:
Marco Crapts
2023-05-26 19:21:27 +02:00
parent 7c1e74ff39
commit 41390233c1
6 changed files with 57 additions and 16 deletions

View 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>