mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 10:41:13 +08:00
fix(button): only apply has-icon-only if icon has the slot for icon-only (#18343)
fixes #18329
This commit is contained in:
@ -130,16 +130,8 @@ export class Button implements ComponentInterface {
|
||||
}
|
||||
}
|
||||
|
||||
private get hasLabel() {
|
||||
return this.el.textContent !== null && this.el.textContent.trim() !== '';
|
||||
}
|
||||
|
||||
private get hasIcon() {
|
||||
return !!this.el.querySelector('ion-icon');
|
||||
}
|
||||
|
||||
private get hasIconOnly() {
|
||||
return this.hasIcon && !this.hasLabel;
|
||||
return !!this.el.querySelector('ion-icon[slot="icon-only"]');
|
||||
}
|
||||
|
||||
private get rippleType() {
|
||||
|
Reference in New Issue
Block a user