Compact toasts, drop title and padding

This commit is contained in:
shamoon
2023-11-09 19:53:26 -08:00
parent facb7226fe
commit 8c67e486c7
8 changed files with 57 additions and 101 deletions

View File

@@ -1,9 +1,13 @@
<ngb-toast
*ngFor="let toast of toasts"
[header]="toast.title" [autohide]="true" [delay]="toast.delay"
[autohide]="true" [delay]="toast.delay"
[class]="toast.classname"
[class.mb-2]="true"
(hidden)="toastService.closeToast(toast)">
<p>{{toast.content}}</p>
<div class="d-flex">
<p class="mb-0">{{toast.content}}</p>
<button type="button" class="btn-close ms-auto" data-bs-dismiss="toast" aria-label="Close" (click)="toastService.closeToast(toast);"></button>
</div>
<details *ngIf="toast.error">
<div class="p-3">
<dl class="row" *ngIf="isDetailedError(toast.error)">
@@ -26,5 +30,5 @@
</div>
</div>
</details>
<p class="mb-0" *ngIf="toast.action"><button class="btn btn-sm btn-outline-secondary" (click)="toastService.closeToast(toast); toast.action()">{{toast.actionName}}</button></p>
<p class="mb-0 mt-2" *ngIf="toast.action"><button class="btn btn-sm btn-outline-secondary" (click)="toastService.closeToast(toast); toast.action()">{{toast.actionName}}</button></p>
</ngb-toast>