Skip to content

Commit 4252448

Browse files
committed
fix(button): exclude solid from getting added to the button in the class
This prevents `button-solid-secondary` from being added when it should just be `button-secondary`. references #6202
1 parent 21f8652 commit 4252448

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ionic/components/button/button.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ export class Button {
322322
this._renderer.setElementClass(this._elementRef.nativeElement, this._role + '-' + type.toLowerCase(), assignCssClass);
323323
}
324324
}
325-
325+
326326
/**
327327
* @private
328328
*/
@@ -331,7 +331,7 @@ export class Button {
331331
// Support array to allow removal of many styles at once.
332332
let styles = (type instanceof Array ? type : [type]);
333333
styles.forEach(styleName => {
334-
let colorStyle = (styleName !== null && styleName !== 'default' ? styleName.toLowerCase() + '-' : '');
334+
let colorStyle = (styleName !== null && styleName !== 'default' && styleName !== 'solid' ? styleName.toLowerCase() + '-' : '');
335335
this._colors.forEach(colorName => {
336336
this._setClass(colorStyle + colorName, assignCssClass); // button-secondary, button-clear-secondary
337337
});

0 commit comments

Comments
 (0)