Skip to content
Permalink
Browse files
fix(b-avatar): remove duplicate button variant class (#5056)
* fix(b-avatar): remove duplicate button variant class

* Update avatar.js
  • Loading branch information
tmorehouse committed Apr 1, 2020
1 parent 64e4a6f commit 9f78f32d964b187f35a1feffb7aa4bc264587923
Showing 1 changed file with 3 additions and 2 deletions.
@@ -161,14 +161,15 @@ export const BAvatar = /*#__PURE__*/ Vue.extend({
const fontSize = size ? `calc(${size} * ${FONT_SIZE_SCALE})` : null
$content = h('span', { style: { fontSize } }, text)
} else {
// Fallback default avatar content
$content = h(BIconPersonFill, { attrs: { 'aria-hidden': 'true', alt } })
}

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

0 comments on commit 9f78f32

Please sign in to comment.