diff --git a/app/assets/javascripts/discourse/widgets/button.js.es6 b/app/assets/javascripts/discourse/widgets/button.js.es6 index 8b8ae46dc1d..96b37087003 100644 --- a/app/assets/javascripts/discourse/widgets/button.js.es6 +++ b/app/assets/javascripts/discourse/widgets/button.js.es6 @@ -4,8 +4,14 @@ import { iconNode } from 'discourse/helpers/fa-icon'; export default createWidget('button', { tagName: 'button.widget-button', - buildClasses() { - if (this.attrs.className) { return this.attrs.className; } + buildClasses(attrs) { + const className = this.attrs.className || ''; + + if (!attrs.label && !attrs.contents) { + return className + ' no-text'; + } + + return className; }, buildAttributes() { diff --git a/app/assets/javascripts/discourse/widgets/topic-admin-menu.js.es6 b/app/assets/javascripts/discourse/widgets/topic-admin-menu.js.es6 index f2b9a57945e..c88c73a3835 100644 --- a/app/assets/javascripts/discourse/widgets/topic-admin-menu.js.es6 +++ b/app/assets/javascripts/discourse/widgets/topic-admin-menu.js.es6 @@ -29,7 +29,7 @@ createWidget('topic-admin-menu-button', { const result = []; result.push(this.attach('button', { - className: 'btn no-text' + (attrs.fixed ? " show-topic-admin" : ""), + className: 'btn ' + (attrs.fixed ? " show-topic-admin" : ""), title: 'topic_admin_menu', icon: 'wrench', action: 'showAdminMenu', diff --git a/app/assets/javascripts/discourse/widgets/topic-notifications-button.js.es6 b/app/assets/javascripts/discourse/widgets/topic-notifications-button.js.es6 index f5d2deffb90..66223ebb40f 100644 --- a/app/assets/javascripts/discourse/widgets/topic-notifications-button.js.es6 +++ b/app/assets/javascripts/discourse/widgets/topic-notifications-button.js.es6 @@ -52,7 +52,7 @@ export default createWidget('topic-notifications-button', { if (this.attrs.showFullTitle) { button.label = `topic.notifications.${details.key}.title`; } else { - button.className = 'btn no-text notifications-dropdown'; + button.className = 'btn notifications-dropdown'; } return this.attach('button', button);