Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added description for the top banner #164

Merged
merged 2 commits into from
Feb 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<sds-header #header [model]="modelHeader" (linkEvent)="linkEvent.next($event)"></sds-header>
<sds-header #header [model]="modelHeader" (linkEvent)="linkEvent.next($event)"
topBannerDescription="Authoritative site for Assistance Listings and Wage Determinations only"
></sds-header>
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<sds-top-banner *ngIf="showTopBanner"></sds-top-banner>
<sds-top-banner *ngIf="showTopBanner"
[description]="topBannerDescription"
></sds-top-banner>
<div
class="usa-overlay"
[class.is-visible]="mobileNavActive"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class SdsHeaderComponent {
*/
@Input() model: HeaderModel;

@Input() topBannerDescription: string = '';
/**
* Takes in a text string and removes all white space characters and returns the new string
* @param text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
>
<span class="usa-banner__button-text">Here’s how you know</span>
</button>
<div class="usa-banner__header-description">
<em>{{ description }}</em>
</div>
</div>
</header>
<div
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { Component, Input } from '@angular/core';

@Component({
selector: 'sds-top-banner',
Expand All @@ -7,6 +7,7 @@ import { Component } from '@angular/core';
})
export class SdsTopBannerComponent {
showDetail = false;
@Input() description = '';

toggleDetails() {
this.showDetail = !this.showDetail;
Expand Down