Skip to content

Commit

Permalink
fix(AvatarGroup): use ui.wrapper as inheritAttrs is not false
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Sep 7, 2023
1 parent aaf09ad commit eb609b1
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/runtime/components/elements/AvatarGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ export default defineComponent({
vProps.size = props.size
}

vProps.class = node.props.class || ''
vProps.class += ` ${classNames(
vProps.ui = node.props.ui || {}
vProps.ui.wrapper = classNames(
appConfig.ui.avatar.wrapper,
vProps.ui.wrapper || '',
ui.value.ring,
ui.value.margin
)}`
)

return cloneVNode(node, vProps)
}
Expand All @@ -59,10 +61,13 @@ export default defineComponent({
return h(Avatar, {
size: props.size,
text: `+${children.value.length - max.value}`,
class: classNames(
ui.value.ring,
ui.value.margin
)
ui: {
wrapper: classNames(
appConfig.ui.avatar.wrapper,
ui.value.ring,
ui.value.margin
)
}
})
}

Expand Down

0 comments on commit eb609b1

Please sign in to comment.