Skip to content

Commit

Permalink
feat(snackbar): update ng-content logic and README #3328
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsvyatkova committed Jan 8, 2019
1 parent b2afa5b commit e6c002c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion projects/igniteui-angular/src/lib/snackbar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ By default, the IgxSnackbar will be automatically hidden after 4000 milliseconds
<span>Custom content</span>
</igx-snackbar>
```
You can display custom content in the snackbar when there is no message. If a message is set, the custom content will not be displayed.
You can display custom content by adding elements inside the snackbar.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="igx-snackbar" *ngIf="isVisible" (@slideInOut.start)="snackbarAnimationStarted($event)" (@slideInOut.done)="snackbarAnimationDone($event)"
[@slideInOut]="isVisible">
<span class="igx-snackbar__message" [@fadeInOut]="isVisible">{{ message }}</span>
<ng-content *ngIf="!message"></ng-content>
<span class="igx-snackbar__message" [@fadeInOut]="isVisible" *ngIf="message">{{ message }}</span>
<ng-content></ng-content>
<button class="igx-snackbar__button" igxRipple="white" *ngIf="actionText" [@fadeInOut] (click)="triggerAction()">
{{ actionText }}
</button>
Expand Down

0 comments on commit e6c002c

Please sign in to comment.