1 import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core'
2 import { GlobalIconName } from '@app/shared/shared-icons'
6 styleUrls: [ './button.component.scss' ],
7 templateUrl: './button.component.html',
8 changeDetection: ChangeDetectionStrategy.OnPush
11 export class ButtonComponent implements OnChanges {
13 @Input() className = 'grey-button'
14 @Input() icon: GlobalIconName = undefined
15 @Input() routerLink: string[] | string
16 @Input() title: string = undefined
17 @Input() loading = false
18 @Input() disabled = false
19 @Input() responsiveLabel = false
21 classes: { [id: string]: boolean } = {}
25 [this.className]: true,
26 disabled: this.disabled,
27 'icon-only': !this.label,
28 'has-icon': !!this.icon,
29 'responsive-label': this.responsiveLabel