error messages kinda

This commit is contained in:
2024-12-17 08:53:49 +01:00
parent 71612b1a9c
commit 2503c33005
3 changed files with 62 additions and 6 deletions

View File

@ -0,0 +1,32 @@
import {Component, Input} from "@angular/core";
import {NgIf} from "@angular/common";
@Component({
standalone: true,
selector: 'app-error-msg',
imports: [
NgIf
],
template: `
<div *ngIf="msg" class="alert alert-danger">
{{ msg }}
</div>
`,
styles: `
.alert {
color: white;
background-color: red;
border-radius: 4px;
padding: 4px;
}
.alert-danger {
background-color: red;
}
`
})
export class ErrorMsgComponent {
@Input()
msg: string | null = null;
}