23 lines
480 B
TypeScript
23 lines
480 B
TypeScript
import {Component, ElementRef, Input} from '@angular/core';
|
|
|
|
@Component({
|
|
selector: 'sae-alert-box',
|
|
// standalone: true,
|
|
imports: [],
|
|
templateUrl: './alert-box.html',
|
|
styleUrl: './alert-box.scss'
|
|
})
|
|
export class AlertBox {
|
|
@Input() public message = "";
|
|
@Input() public alertKind = "warning";
|
|
|
|
constructor(private host: ElementRef<HTMLElement>) {
|
|
}
|
|
|
|
// whatEver function name you want to give
|
|
onCloseClicked() {
|
|
this.host.nativeElement.remove();
|
|
}
|
|
|
|
|
|
}
|