fix(menu-toggle): move logic for css class to the menu toggle

fixes #8943
This commit is contained in:
Brandy Carney
2016-11-23 12:00:34 -05:00
committed by Adam Bradley
parent 54a7a745ee
commit 624cb356df
4 changed files with 29 additions and 26 deletions

View File

@ -126,9 +126,6 @@ export class Button extends Ion {
/** @private */
_role: string = 'button'; // bar-button
/** @private */
_mt: boolean; // menutoggle
/** @private */
_size: string; // large/small/default
@ -259,7 +256,6 @@ export class Button extends Ion {
}
constructor(
@Attribute('menuToggle') menuToggle: string,
@Attribute('ion-button') ionButton: string,
config: Config,
elementRef: ElementRef,
@ -275,12 +271,6 @@ export class Button extends Ion {
if (ionButton.trim().length > 0) {
this.setRole(ionButton);
}
// menuToggle can be added with or without a string
// but if the attribute isn't added it will be null
if (menuToggle !== null) {
this._mt = true;
}
}
/** @private */
@ -307,7 +297,6 @@ export class Button extends Ion {
this.setElementClass(role, assignCssClass); // button
this.setElementClass(`${role}-${this._mode}`, assignCssClass); // button
this._setClass('menutoggle', this._mt); // menutoggle
this._setClass(this._style, assignCssClass); // button-clear
this._setClass(this._shape, assignCssClass); // button-round
this._setClass(this._display, assignCssClass); // button-full