Skip to content

Commit 5d6e1fc

Browse files
authored
fix(Banner): ensure actions slot renders (#4946)
1 parent 117b4b3 commit 5d6e1fc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/runtime/components/Banner.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function onClose() {
145145
</slot>
146146
</div>
147147

148-
<div v-if="actions?.length" :class="ui.actions({ class: props.ui?.actions })">
148+
<div v-if="actions?.length || !!slots.actions" :class="ui.actions({ class: props.ui?.actions })">
149149
<slot name="actions">
150150
<UButton v-for="(action, index) in actions" :key="index" color="neutral" size="xs" v-bind="action" />
151151
</slot>

test/components/__snapshots__/Banner-vue.spec.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ exports[`Banner > renders with actions slot correctly 1`] = `
2626
<div data-v-0fc735df="" class="flex items-center gap-1.5 min-w-0">
2727
<!--v-if-->
2828
<!--v-if-->
29-
<!--v-if-->
29+
<div data-v-0fc735df="" class="flex gap-1.5 shrink-0 isolate">Actions slot</div>
3030
</div>
3131
<div data-v-0fc735df="" class="lg:flex-1 flex items-center justify-end">
3232
<!--v-if-->

test/components/__snapshots__/Banner.spec.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ exports[`Banner > renders with actions slot correctly 1`] = `
2626
<div data-v-8f05efd1="" class="flex items-center gap-1.5 min-w-0">
2727
<!--v-if-->
2828
<!--v-if-->
29-
<!--v-if-->
29+
<div data-v-8f05efd1="" class="flex gap-1.5 shrink-0 isolate">Actions slot</div>
3030
</div>
3131
<div data-v-8f05efd1="" class="lg:flex-1 flex items-center justify-end">
3232
<!--v-if-->

0 commit comments

Comments
 (0)