From fbd6e6d41205fa6ef4f4cbaee0d2e19eef131832 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Mon, 11 Feb 2019 20:12:26 -0500 Subject: [PATCH] notification hub can display errors --- .../notification-hub/notification-hub.component.html | 2 +- .../notification-hub/notification-hub.component.scss | 5 +++++ .../notification-hub/notification-hub.component.ts | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/app/components/notification-hub/notification-hub.component.html b/src/app/components/notification-hub/notification-hub.component.html index 48514e6e..1ddc6219 100644 --- a/src/app/components/notification-hub/notification-hub.component.html +++ b/src/app/components/notification-hub/notification-hub.component.html @@ -1,5 +1,5 @@
-
+
{{ notification.message }}
diff --git a/src/app/components/notification-hub/notification-hub.component.scss b/src/app/components/notification-hub/notification-hub.component.scss index b5e96ebb..4d7cc64c 100644 --- a/src/app/components/notification-hub/notification-hub.component.scss +++ b/src/app/components/notification-hub/notification-hub.component.scss @@ -11,5 +11,10 @@ border-radius: 2px; margin: 0 0 5px 15px; cursor: pointer; + + &--error{ + background-color: #be0a0a; + color: whitesmoke; + } } } \ No newline at end of file diff --git a/src/app/components/notification-hub/notification-hub.component.ts b/src/app/components/notification-hub/notification-hub.component.ts index 75341ce4..3b0ff926 100644 --- a/src/app/components/notification-hub/notification-hub.component.ts +++ b/src/app/components/notification-hub/notification-hub.component.ts @@ -20,15 +20,15 @@ export class NotificationHubComponent implements OnInit { }, 2000); }); - // this.autoSubmit(); + //this.autoSubmit(); } autoSubmit(): any { - this.notificationService.notify("test message", false); + this.notificationService.notify("test message", true); setTimeout(() => { this.autoSubmit(); - }, 5000); + }, 1500); } onClick(notification: NotificatioData): void{