<script setup lang="ts">
import colors from '../../ui.config'
withDefaults(defineProps<{
title: string,
color?: keyof typeof colors,
icon?: string,
}>(), {
color: 'blue',
})
</script>
<template>
<div :class="colors[$props.color!]" class="border-l-4 rounded-l-sm rounded-r-md space-y-2 px-4 py-3">
<h4 class="flex items-center space-x-2 text-inherit font-semibold">
<Icon v-if="icon" :name="icon" class="w-4 h-4 inline-block" />
<span>{{ title }}</span>
</h4>
<slot />
</div>
</template>
<script setup lang="ts">
import colors from '../../ui.config'
withDefaults(defineProps<{
title: string,
color?: keyof typeof colors,
icon?: string,
}>(), {
color: 'blue',
})
</script>
<template>
<div :class="colors[$props.color!]" class="border-l-4 rounded-l-sm rounded-r-md space-y-2 px-4 py-3">
<h4 class="flex items-center space-x-2 text-inherit font-semibold">
<Icon v-if="icon" :name="icon" class="w-4 h-4 inline-block" />
<span>{{ title }}</span>
</h4>
<slot />
</div>
</template>