mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(button): add a category to buttons so they won't get the button styles
fixes #6237
This commit is contained in:
@@ -58,6 +58,11 @@ export class Button {
|
||||
*/
|
||||
isItem: boolean;
|
||||
|
||||
/**
|
||||
* @input {string} The category of the button.
|
||||
*/
|
||||
@Input() category: string;
|
||||
|
||||
/**
|
||||
* @input {string} Large button.
|
||||
*/
|
||||
@@ -179,6 +184,16 @@ export class Button {
|
||||
this._readAttrs(element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
ngOnInit() {
|
||||
// If the button has a role applied to it
|
||||
if (this.category) {
|
||||
this.setRole(this.category);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user