import {Component, Input, OnInit, Output, EventEmitter} from '@angular/core'; @Component({ selector: 'onguard-button', templateUrl: './onguard-button.component.html', styleUrls: ['./onguard-button.component.scss'] }) export class OnguardButtonComponent implements OnInit { @Input() type = 'primary'; @Output() clickAction = new EventEmitter(); public buttonTypesClass = { primary : 'blue-button', secondary : 'blue-button-inverse', neutral : 'transparent-button', dismiss : 'red-button-inverse' }; public buttonClass; constructor() { } ngOnInit(): void { this.buttonClass = this.buttonTypesClass[this.type]; } }