File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
framework/core/js/src/common/components Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export interface IButtonAttrs extends ComponentAttrs {
1414 *
1515 * You may also provide a rendered icon element directly.
1616 */
17- icon ?: string | Mithril . Children ;
17+ icon ?: string | boolean | Mithril . Children ;
1818 /**
1919 * Disables button from user input.
2020 *
@@ -116,7 +116,7 @@ export default class Button<CustomAttrs extends IButtonAttrs = IButtonAttrs> ext
116116 const icon = this . attrs . icon ;
117117
118118 return [
119- icon ? typeof icon === 'string' ? < Icon name = { icon } className = "Button-icon" /> : icon : null ,
119+ icon && ( typeof icon === 'string' || icon === true ? < Icon name = { icon } className = "Button-icon" /> : icon ) ,
120120 children && (
121121 < span className = "Button-label" >
122122 < span className = "Button-labelText" > { children } </ span >
You can’t perform that action at this time.
0 commit comments