ng-implementation/my-workspace/projects/sae-lib/alert-box/alert-box.ts

24 lines
480 B
TypeScript
Raw Normal View History

2025-09-09 14:43:57 +02:00
import {Component, ElementRef, Input} from '@angular/core';
2025-08-08 11:31:27 +02:00
@Component({
selector: 'sae-alert-box',
2025-09-22 14:53:02 +02:00
// standalone: true,
imports: [],
2025-08-08 11:31:27 +02:00
templateUrl: './alert-box.html',
styleUrl: './alert-box.scss'
})
export class AlertBox {
2025-09-09 14:43:57 +02:00
@Input() public message = "";
2025-09-22 14:53:02 +02:00
@Input() public alertKind = "warning";
2025-09-09 14:43:57 +02:00
constructor(private host: ElementRef<HTMLElement>) {
}
2025-09-09 14:43:57 +02:00
// whatEver function name you want to give
onCloseClicked() {
this.host.nativeElement.remove();
}
2025-08-08 11:31:27 +02:00
}