alfresco-ng2-components/lib/core/info-drawer/info-drawer.component.html
Nicolas Barithel 88a5a57c46 Display icon and label in adf-info-drawer-tab (#3628)
- label is not displayed in case there is an icon set on the adf-info-drawer-tab
because it is using a mat-tab-label layout
2018-08-14 15:42:36 +01:00

28 lines
1.2 KiB
HTML

<adf-info-drawer-layout>
<div *ngIf="title" info-drawer-title>{{title}}</div>
<ng-content *ngIf="!title" info-drawer-title select="[info-drawer-title]"></ng-content>
<ng-content info-drawer-buttons select="[info-drawer-buttons]"></ng-content>
<ng-container info-drawer-content *ngIf="showTabLayout(); then tabLayout else singleLayout"></ng-container>
<ng-template #tabLayout>
<mat-tab-group [(selectedIndex)]="selectedIndex" class="adf-info-drawer-tabs" (selectedTabChange)="onTabChange($event)">
<mat-tab *ngFor="let contentBlock of contentBlocks" [label]="contentBlock.label" class="adf-info-drawer-tab">
<ng-container *ngIf="contentBlock.icon">
<ng-template mat-tab-label>
<mat-icon>{{ contentBlock.icon }}</mat-icon>
<span *ngIf="contentBlock.label">{{ contentBlock.label }}</span>
</ng-template>
</ng-container>
<ng-container *ngTemplateOutlet="contentBlock.content"></ng-container>
</mat-tab>
</mat-tab-group>
</ng-template>
<ng-template #singleLayout>
<ng-content select="[info-drawer-content]"></ng-content>
</ng-template>
</adf-info-drawer-layout>