diff --git a/src/app/components/button/button.ts b/src/app/components/button/button.ts index a6b9d9a5c1c..95bbc32789d 100755 --- a/src/app/components/button/button.ts +++ b/src/app/components/button/button.ts @@ -349,7 +349,8 @@ export class ButtonDirective implements AfterViewInit, OnDestroy { changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { - class: 'p-element' + class: 'p-element', + '[class.p-disabled]': 'disabled' || 'loading' } }) export class Button implements AfterContentInit { @@ -524,7 +525,6 @@ export class Button implements AfterContentInit { 'p-button p-component': true, 'p-button-icon-only': (this.icon || this.iconTemplate || this.loadingIcon || this.loadingIconTemplate) && !this.label, 'p-button-vertical': (this.iconPos === 'top' || this.iconPos === 'bottom') && this.label, - 'p-disabled': this.disabled || this.loading, 'p-button-loading': this.loading, 'p-button-loading-label-only': this.loading && !this.icon && this.label && !this.loadingIcon && this.iconPos === 'left', 'p-button-link': this.link,