diff options
Diffstat (limited to 'client/src/app/shared/buttons')
-rw-r--r-- | client/src/app/shared/buttons/button.component.html | 4 | ||||
-rw-r--r-- | client/src/app/shared/buttons/button.component.scss | 12 | ||||
-rw-r--r-- | client/src/app/shared/buttons/button.component.ts | 18 |
3 files changed, 34 insertions, 0 deletions
diff --git a/client/src/app/shared/buttons/button.component.html b/client/src/app/shared/buttons/button.component.html new file mode 100644 index 000000000..87a8daccf --- /dev/null +++ b/client/src/app/shared/buttons/button.component.html | |||
@@ -0,0 +1,4 @@ | |||
1 | <span class="action-button" [ngClass]="className" [title]="getTitle()"> | ||
2 | <span class="icon" [ngClass]="icon"></span> | ||
3 | <span class="button-label">{{ label }}</span> | ||
4 | </span> | ||
diff --git a/client/src/app/shared/buttons/button.component.scss b/client/src/app/shared/buttons/button.component.scss index 343aea207..168102f09 100644 --- a/client/src/app/shared/buttons/button.component.scss +++ b/client/src/app/shared/buttons/button.component.scss | |||
@@ -26,6 +26,18 @@ | |||
26 | &.icon-delete-grey { | 26 | &.icon-delete-grey { |
27 | background-image: url('../../../assets/images/global/delete-grey.svg'); | 27 | background-image: url('../../../assets/images/global/delete-grey.svg'); |
28 | } | 28 | } |
29 | |||
30 | &.icon-im-with-her { | ||
31 | background-image: url('../../../assets/images/global/im-with-her.svg'); | ||
32 | } | ||
33 | |||
34 | &.icon-tick { | ||
35 | background-image: url('../../../assets/images/global/tick.svg'); | ||
36 | } | ||
37 | |||
38 | &.icon-cross { | ||
39 | background-image: url('../../../assets/images/global/cross.svg'); | ||
40 | } | ||
29 | } | 41 | } |
30 | } | 42 | } |
31 | 43 | ||
diff --git a/client/src/app/shared/buttons/button.component.ts b/client/src/app/shared/buttons/button.component.ts new file mode 100644 index 000000000..967cb1409 --- /dev/null +++ b/client/src/app/shared/buttons/button.component.ts | |||
@@ -0,0 +1,18 @@ | |||
1 | import { Component, Input } from '@angular/core' | ||
2 | |||
3 | @Component({ | ||
4 | selector: 'my-button', | ||
5 | styleUrls: ['./button.component.scss'], | ||
6 | templateUrl: './button.component.html' | ||
7 | }) | ||
8 | |||
9 | export class ButtonComponent { | ||
10 | @Input() label = '' | ||
11 | @Input() className = undefined | ||
12 | @Input() icon = undefined | ||
13 | @Input() title = undefined | ||
14 | |||
15 | getTitle () { | ||
16 | return this.title || this.label | ||
17 | } | ||
18 | } | ||