Skip to content

Commit f270d25

Browse files
committed
fix
1 parent 5c8e2b9 commit f270d25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

framework/core/js/src/common/components/Button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)