-
Notifications
You must be signed in to change notification settings - Fork 919
Closed
Labels
enhancementNew feature or requestNew feature or requesttriageAwaiting initial review and prioritizationAwaiting initial review and prioritizationv4#4488#4488
Description
Package
v4.0.0-alpha.x
Description
Currently, u-banner only shows the actions slots if there is non-empty actions array. That leads to unwanted boilerplate with unused arrays just for the sake of it:
u-banner(title="Transaction pending" :actions="[{}]")
template(#actions)
u-button SignAbove, the :actions="[{}]" serves no purpose other than to satisfy the condition inside u-banner:
<div v-if="actions?.length" :class="ui.actions({ class: props.ui?.actions })">
<slot name="actions">
<UButton v-for="(action, index) in actions" :key="index" color="neutral" size="xs" v-bind="action" />
</slot>
</div>What I propose it, change it like this:
<div v-if="actions?.length || $slots.actions" ...Additional context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesttriageAwaiting initial review and prioritizationAwaiting initial review and prioritizationv4#4488#4488