aboutsummaryrefslogtreecommitdiff
path: root/src/ui/c-alert/c-alert.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/c-alert/c-alert.vue')
-rw-r--r--src/ui/c-alert/c-alert.vue7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ui/c-alert/c-alert.vue b/src/ui/c-alert/c-alert.vue
index 607acb9..8a3b55e 100644
--- a/src/ui/c-alert/c-alert.vue
+++ b/src/ui/c-alert/c-alert.vue
@@ -1,8 +1,8 @@
<script lang="ts" setup>
import { useTheme } from './c-alert.theme';
-const props = withDefaults(defineProps<{ type?: 'warning' }>(), { type: 'warning' });
-const { type } = toRefs(props);
+const props = withDefaults(defineProps<{ type?: 'warning'; title?: string }>(), { type: 'warning', title: undefined });
+const { type, title } = toRefs(props);
const theme = useTheme();
const variantTheme = computed(() => theme.value[type.value]);
@@ -17,6 +17,9 @@ const variantTheme = computed(() => theme.value[type.value]);
</div>
<div class="c-alert--content">
+ <div v-if="title" class="c-alert--title" text-15px fw-600>
+ {{ title }}
+ </div>
<slot />
</div>
</div>