diff --git a/core/src/components/button/button.tsx b/core/src/components/button/button.tsx index 0d3166bde7b..4475e1374e2 100644 --- a/core/src/components/button/button.tsx +++ b/core/src/components/button/button.tsx @@ -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() { diff --git a/core/src/components/toolbar/test/spec/index.html b/core/src/components/toolbar/test/spec/index.html index 439b5b8dd97..4a6510855ac 100644 --- a/core/src/components/toolbar/test/spec/index.html +++ b/core/src/components/toolbar/test/spec/index.html @@ -117,12 +117,12 @@ - + - + @@ -138,12 +138,12 @@ - + - + @@ -242,6 +242,36 @@ + + + + Click to Add Text + + + + + + + + + + +