Staff Banner Additions
authorKyle Huckins <khuckins@catalyte.io>
Fri, 6 Dec 2019 07:51:16 +0000 (07:51 +0000)
committerKyle Huckins <khuckins@catalyte.io>
Fri, 6 Dec 2019 07:51:16 +0000 (07:51 +0000)
- Add bannerStyle and bannerIcon parameters to
eg-staff-banner to improve eg-staff-banner
accessability

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
 Changes to be committed:
modified:   Open-ILS/src/eg2/src/app/staff/share/staff-banner.component.ts

Open-ILS/src/eg2/src/app/staff/share/staff-banner.component.ts

index 1274086..d3f5916 100644 (file)
@@ -3,15 +3,19 @@ import {Component, OnInit, Input} from '@angular/core';
 @Component({
   selector: 'eg-staff-banner',
   template: `
-    <div class="lead alert alert-primary text-center pt-1 pb-1" role="alert">
+    <div class="lead alert alert-primary text-center pt-1 pb-1" role="alert"
+      [ngClass]="bannerStyle ? bannerStyle : 'alert-primary'">
       <eg-title i18n-prefix [prefix]="bannerText"></eg-title>
-       <span>{{bannerText}}</span>
+      <i class="material-icons align-middle text-left" *ngIf="bannerIcon">{{bannerIcon}}</i>
+       <span class="align-middle">{{bannerText}}</span>
     </div>
     `
 })
 
 export class StaffBannerComponent {
     @Input() public bannerText: string;
+    @Input() public bannerIcon: string;
+    @Input() public bannerStyle: string;
 }