import { Component, Inject, ElementRef, OnInit } from '@angular/core'; import { WptDialogRef, WPT_DIALOG_DATA } from '@arrow/warpaint/dialog'; @Component({ selector: 'bom-prompt', templateUrl: './prompt.component.html', styleUrls: ['./prompt.component.scss'] }) export class PromptComponent implements OnInit { public defaultTitle: string = 'BOM Tool'; constructor( public dialogRef: WptDialogRef, @Inject(WPT_DIALOG_DATA) public data: any, private el: ElementRef ) {} ngOnInit(): void { this.el.nativeElement.className = this.data.style; } closeModal(): void { this.dialogRef.close(); } submit(userInput) { this.dialogRef.close(userInput.value); } }