Browse Source

chore(theme-shared): remove decrecated input from the button

pull/2119/head
mehmet-erim 7 years ago
parent
commit
af76b3ab65
  1. 9
      npm/ng-packs/packages/theme-shared/src/lib/components/button/button.component.ts

9
npm/ng-packs/packages/theme-shared/src/lib/components/button/button.component.ts

@ -7,7 +7,7 @@ import { ABP } from '@abp/ng.core';
template: ` template: `
<button <button
#button #button
[attr.type]="buttonType || type" [attr.type]="buttonType"
[ngClass]="buttonClass" [ngClass]="buttonClass"
[disabled]="loading || disabled" [disabled]="loading || disabled"
(click)="onClick($event)" (click)="onClick($event)"
@ -23,7 +23,7 @@ export class ButtonComponent implements OnInit {
buttonClass = 'btn btn-primary'; buttonClass = 'btn btn-primary';
@Input() @Input()
buttonType; // TODO: Add initial value. buttonType = 'button';
@Input() @Input()
iconClass: string; iconClass: string;
@ -49,11 +49,6 @@ export class ButtonComponent implements OnInit {
@ViewChild('button', { static: true }) @ViewChild('button', { static: true })
buttonRef: ElementRef<HTMLButtonElement>; buttonRef: ElementRef<HTMLButtonElement>;
/**
* @deprecated Use buttonType instead. To be deleted in v1
*/
@Input() type = 'button';
get icon(): string { get icon(): string {
return `${this.loading ? 'fa fa-spinner fa-spin' : this.iconClass || 'd-none'}`; return `${this.loading ? 'fa fa-spinner fa-spin' : this.iconClass || 'd-none'}`;
} }

Loading…
Cancel
Save