Skip to content

Commit

Permalink
fix(b-avatar): remove duplicate button variant class (#5056)
Browse files Browse the repository at this point in the history
* fix(b-avatar): remove duplicate button variant class

* Update avatar.js
  • Loading branch information
tmorehouse authored Apr 1, 2020
1 parent 64e4a6f commit 9f78f32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/avatar/avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9f78f32

Please sign in to comment.