-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #819 from mobi/feature_toast_maxheight_icon_override
[Feature] go-toast maxHeight & icon overrides
- Loading branch information
Showing
6 changed files
with
210 additions
and
75 deletions.
There are no files selected for viewing
76 changes: 40 additions & 36 deletions
76
projects/go-lib/src/lib/components/go-toast/go-toast.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,51 @@ | ||
<div class="go-toast" [ngClass]="{'go-toast--dark': theme === 'dark'}"> | ||
<div class="go-toast-strip" [ngClass]="statusClass"></div> | ||
<div class="go-toast-strip" [ngClass]="_status"></div> | ||
<div class="go-toast-status"> | ||
<go-icon | ||
class="go-toast-status__icon" | ||
[ngClass]="statusClass" | ||
[icon]="icon"> | ||
[ngClass]="_status" | ||
[icon]="_icon"> | ||
</go-icon> | ||
</div> | ||
<div | ||
class="go-toast-content" | ||
[ngClass]="{ 'go-toast-content--no-title': !header }"> | ||
<h4 | ||
class="go-heading-4 go-toast-content__title" | ||
*ngIf="header || headerContent"> | ||
<ng-container *ngIf="headerContent; else headerContentElse"> | ||
<ng-container *ngTemplateOutlet="headerContent"></ng-container> | ||
class="go-toast__container" | ||
[ngClass]="{ 'go-toast__container--max-height': enableMaxHeight }"> | ||
<div | ||
class="go-toast-content" | ||
[ngClass]="{ 'go-toast-content--no-title': !header }"> | ||
<h4 | ||
class="go-heading-4 go-toast-content__title" | ||
*ngIf="header || headerContent"> | ||
<ng-container *ngIf="headerContent; else headerContentElse"> | ||
<ng-container *ngTemplateOutlet="headerContent"></ng-container> | ||
</ng-container> | ||
<ng-template #headerContentElse> | ||
{{ header }} | ||
</ng-template> | ||
</h4> | ||
|
||
<ng-container *ngIf="messageContent; else messageContentElse"> | ||
<p class="go-toast-content__message"> | ||
<ng-container *ngTemplateOutlet="messageContent"></ng-container> | ||
</p> | ||
</ng-container> | ||
<ng-template #headerContentElse> | ||
{{ header }} | ||
<ng-template #messageContentElse> | ||
<p | ||
class="go-toast-content__message" | ||
[innerHTML]="message"> | ||
</p> | ||
</ng-template> | ||
</h4> | ||
|
||
<ng-container *ngIf="messageContent; else messageContentElse"> | ||
<p class="go-toast-content__message"> | ||
<ng-container *ngTemplateOutlet="messageContent"></ng-container> | ||
</p> | ||
</ng-container> | ||
<ng-template #messageContentElse> | ||
<p | ||
class="go-toast-content__message" | ||
[innerHTML]="message"> | ||
</p> | ||
</ng-template> | ||
</div> | ||
<div | ||
class="go-toast-dismiss" | ||
*ngIf="dismissable"> | ||
<go-icon-button | ||
buttonIcon="close" | ||
(handleClick)="dismiss()"> | ||
</go-icon-button> | ||
</div> | ||
<div class="go-toast__actions" *ngIf="showToastActions"> | ||
<ng-content select="[go-toast-action]"></ng-content> | ||
</div> | ||
<div | ||
class="go-toast-dismiss" | ||
*ngIf="dismissable"> | ||
<go-icon-button | ||
buttonIcon="close" | ||
(handleClick)="dismiss()"> | ||
</go-icon-button> | ||
</div> | ||
<div class="go-toast__actions" *ngIf="showToastActions"> | ||
<ng-content select="[go-toast-action]"></ng-content> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.