aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/buttons/button.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-main/buttons/button.component.ts')
-rw-r--r--client/src/app/shared/shared-main/buttons/button.component.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/client/src/app/shared/shared-main/buttons/button.component.ts b/client/src/app/shared/shared-main/buttons/button.component.ts
index 476057823..10d67831f 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.ts
+++ b/client/src/app/shared/shared-main/buttons/button.component.ts
@@ -1,4 +1,4 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input, OnChanges } from '@angular/core'
2import { GlobalIconName } from '@app/shared/shared-icons' 2import { GlobalIconName } from '@app/shared/shared-icons'
3 3
4@Component({ 4@Component({
@@ -7,7 +7,7 @@ import { GlobalIconName } from '@app/shared/shared-icons'
7 templateUrl: './button.component.html' 7 templateUrl: './button.component.html'
8}) 8})
9 9
10export class ButtonComponent { 10export class ButtonComponent implements OnChanges {
11 @Input() label = '' 11 @Input() label = ''
12 @Input() className = 'grey-button' 12 @Input() className = 'grey-button'
13 @Input() icon: GlobalIconName = undefined 13 @Input() icon: GlobalIconName = undefined
@@ -17,8 +17,10 @@ export class ButtonComponent {
17 @Input() disabled = false 17 @Input() disabled = false
18 @Input() responsiveLabel = false 18 @Input() responsiveLabel = false
19 19
20 getClasses () { 20 classes: { [id: string]: boolean } = {}
21 return { 21
22 ngOnChanges () {
23 this.classes = {
22 [this.className]: true, 24 [this.className]: true,
23 disabled: this.disabled, 25 disabled: this.disabled,
24 'icon-only': !this.label, 26 'icon-only': !this.label,