ng-implementation/my-workspace/projects/sae-lib/alert-box/alert-box.ts
2025-09-09 14:43:57 +02:00

33 lines
665 B
TypeScript

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