Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import { EventEmitter, Input, Output } from '@angular/core';
export abstract class ButtonParentComponent<ButtonTypes = any> {
@Input() public type: 'button' | 'submit' = 'button';
@Input() public buttonType: ButtonTypes;
@Input() public iconButton = false;
@Input() public text = '';
@Input() public disabled = false;
@Input() public buttonStyle: { [key: string]: string };
@Input() public buttonClass: { [key: string]: boolean };
@Output() public clicked = new EventEmitter<void>();
public onClick() {
if (!this.disabled) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment