Skip to content

Commit 9f78f32

Browse files
authored
fix(b-avatar): remove duplicate button variant class (#5056)
* fix(b-avatar): remove duplicate button variant class * Update avatar.js
1 parent 64e4a6f commit 9f78f32

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/avatar/avatar.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,15 @@ export const BAvatar = /*#__PURE__*/ Vue.extend({
161161
const fontSize = size ? `calc(${size} * ${FONT_SIZE_SCALE})` : null
162162
$content = h('span', { style: { fontSize } }, text)
163163
} else {
164+
// Fallback default avatar content
164165
$content = h(BIconPersonFill, { attrs: { 'aria-hidden': 'true', alt } })
165166
}
166167

167168
const componentData = {
168169
staticClass: CLASS_NAME,
169170
class: {
170-
// We use badge/button styles for theme variants
171-
[`${isButton ? 'btn' : 'badge'}-${variant}`]: !!variant,
171+
// We use badge styles for theme variants when not rendering `BButton`
172+
[`badge-${variant}`]: !isButton && variant,
172173
// Rounding/Square
173174
rounded: rounded === true,
174175
'rounded-0': square,

0 commit comments

Comments
 (0)