summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/app/shared/components/alert-panel/alert-panel.component.html
blob: be8096427a6c442eccb793b05a8f4c913816ec35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<ngb-alert type="{{ bootstrapClass }}"
           [dismissible]="dismissible"
           (closed)="onClose()">
  <table>
    <ng-container *ngIf="size === 'normal'; else slim">
      <tr>
        <td *ngIf="showIcon"
            rowspan="2"
            class="alert-panel-icon">
          <i [ngClass]="[icons.large3x]"
             class="alert-{{ bootstrapClass }} {{ typeIcon }}"
             aria-hidden="true"></i>
        </td>
        <td *ngIf="showTitle"
            class="alert-panel-title">{{ title }}</td>
      </tr>
      <tr>
        <td class="alert-panel-text">
          <ng-container *ngTemplateOutlet="content"></ng-container>
        </td>
      </tr>
    </ng-container>
    <ng-template #slim>
      <tr>
        <td *ngIf="showIcon"
            class="alert-panel-icon">
          <i class="alert-{{ bootstrapClass }} {{ typeIcon }}"
             aria-hidden="true"></i>
        </td>
        <td *ngIf="showTitle"
            class="alert-panel-title">{{ title }}</td>
        <td class="alert-panel-text">
          <ng-container *ngTemplateOutlet="content"></ng-container>
        </td>
      </tr>
    </ng-template>
  </table>
</ngb-alert>

<ng-template #content>
  <ng-content></ng-content>
</ng-template>