mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
649 B
30 lines
649 B
import { Component, Input } from '@angular/core';
|
|
|
|
@Component({
|
|
selector: 'abp-button',
|
|
template: `
|
|
<button [attr.type]="buttonType" [ngClass]="buttonClass" [disabled]="loading || disabled">
|
|
<i [ngClass]="icon" class="mr-1"></i><ng-content></ng-content>
|
|
</button>
|
|
`,
|
|
})
|
|
export class ButtonComponent {
|
|
@Input()
|
|
buttonClass: string = 'btn btn-primary';
|
|
|
|
@Input()
|
|
buttonType: string = 'button';
|
|
|
|
@Input()
|
|
iconClass: string;
|
|
|
|
@Input()
|
|
loading: boolean = false;
|
|
|
|
@Input()
|
|
disabled: boolean = false;
|
|
|
|
get icon(): string {
|
|
return `${this.loading ? 'fa fa-spin fa-spinner' : this.iconClass || 'd-none'}`;
|
|
}
|
|
}
|
|
|