2022-02-26 23:19:22 +01:00
|
|
|
<template>
|
|
|
|
<div class="w-full bg-opacity-5 border border-opacity-60 rounded-lg flex items-center relative py-4 pl-16" :class="wrapperClass">
|
|
|
|
<div class="absolute top-0 left-4 h-full flex items-center">
|
2024-08-16 23:57:17 +02:00
|
|
|
<span class="material-symbols text-2xl">{{ icon }}</span>
|
2022-02-26 23:19:22 +01:00
|
|
|
</div>
|
|
|
|
<slot />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
type: {
|
|
|
|
type: String,
|
|
|
|
default: 'error'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
icon() {
|
|
|
|
if (this.type === 'error' || this.type === 'warning') return 'report'
|
|
|
|
return 'info'
|
|
|
|
},
|
|
|
|
wrapperClass() {
|
|
|
|
return `bg-${this.type} border-${this.type} text-${this.type}`
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {},
|
|
|
|
mounted() {}
|
|
|
|
}
|
2024-08-16 23:57:17 +02:00
|
|
|
</script>
|