Skip to content

Commit 125a281

Browse files
committedFeb 14, 2025·
fix(Alert/Notification): allow description ui override
Resolves #2554
1 parent 569fa76 commit 125a281

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed
 

‎src/runtime/components/elements/Alert.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{{ title }}
1515
</slot>
1616
</p>
17-
<div v-if="description || $slots.description" :class="twMerge(ui.description, !title && !$slots.title && 'mt-0 leading-5')">
17+
<div v-if="description || $slots.description" :class="twMerge(ui.description, !title && !$slots.title && ui.descriptionOnly)">
1818
<slot name="description" :description="description">
1919
{{ description }}
2020
</slot>

‎src/runtime/components/overlays/Notification.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{{ title }}
1919
</slot>
2020
</p>
21-
<div v-if="(description || $slots.description)" :class="twMerge(ui.description, !title && !$slots.title && 'mt-0 leading-5')">
21+
<div v-if="(description || $slots.description)" :class="twMerge(ui.description, !title && !$slots.title && ui.descriptionOnly)">
2222
<slot name="description" :description="description">
2323
{{ description }}
2424
</slot>

‎src/runtime/ui.config/elements/alert.ts

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export default {
55
inner: 'w-0 flex-1',
66
title: 'text-sm font-medium',
77
description: 'mt-1 text-sm leading-4 opacity-90',
8+
descriptionOnly: 'mt-0 leading-5',
89
actions: 'flex items-center gap-2 mt-3 flex-shrink-0',
910
shadow: '',
1011
rounded: 'rounded-lg',

‎src/runtime/ui.config/overlays/notification.ts

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export default {
66
inner: 'w-0 flex-1',
77
title: 'text-sm font-medium text-gray-900 dark:text-white',
88
description: 'mt-1 text-sm leading-4 text-gray-500 dark:text-gray-400',
9+
descriptionOnly: 'mt-0 leading-5',
910
actions: 'flex items-center gap-2 mt-3 flex-shrink-0',
1011
background: 'bg-white dark:bg-gray-900',
1112
shadow: 'shadow-lg',

0 commit comments

Comments
 (0)
Please sign in to comment.