feat(components): allow override of sizes through ui prop

This commit is contained in:
Benjamin Canac
2024-07-10 12:57:34 +02:00
parent db30284e7a
commit 6aa0ea306f
13 changed files with 21 additions and 21 deletions

View File

@@ -107,7 +107,7 @@ defineExpose({
:style="{ '--height': height }"
>
<slot name="leading">
<UAvatar v-if="avatar" :size="(ui.avatarSize() as AvatarProps['size'])" v-bind="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
<UAvatar v-if="avatar" :size="((props.ui?.avatarSize || ui.avatarSize()) as AvatarProps['size'])" v-bind="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
<UIcon v-else-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
</slot>