diff --git a/src/platform/web/ui/avatar.js b/src/platform/web/ui/avatar.js index c68d5496..4e502de9 100644 --- a/src/platform/web/ui/avatar.js +++ b/src/platform/web/ui/avatar.js @@ -103,12 +103,15 @@ export class AvatarView extends BaseUpdateView { * @param {Number} size * @return {Element} */ -export function renderStaticAvatar(vm, size) { +export function renderStaticAvatar(vm, size, extraClasses = undefined) { const hasAvatar = !!vm.avatarUrl; - const avatarClasses = classNames({ + let avatarClasses = classNames({ avatar: true, [`usercolor${vm.avatarColorNumber}`]: !hasAvatar, }); + if (extraClasses) { + avatarClasses += ` ${extraClasses}`; + } const avatarContent = hasAvatar ? renderImg(vm, size) : text(vm.avatarLetter); return tag.div({className: avatarClasses}, [avatarContent]); }