error messages kinda
This commit is contained in:
32
src/app/hotel/component/error-msg.component.ts
Normal file
32
src/app/hotel/component/error-msg.component.ts
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user