mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
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
This commit is contained in:
parent
f9195e4e27
commit
88a5a57c46
@ -8,17 +8,16 @@
|
||||
|
||||
<ng-template #tabLayout>
|
||||
<mat-tab-group [(selectedIndex)]="selectedIndex" class="adf-info-drawer-tabs" (selectedTabChange)="onTabChange($event)">
|
||||
<ng-container *ngFor="let contentBlock of contentBlocks">
|
||||
<mat-tab [label]="contentBlock.label" class="adf-info-drawer-tab">
|
||||
<ng-container *ngIf="contentBlock.icon">
|
||||
<ng-template mat-tab-label>
|
||||
<mat-icon>{{ contentBlock.icon }}</mat-icon>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
<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>
|
||||
</ng-container>
|
||||
<ng-container *ngTemplateOutlet="contentBlock.content"></ng-container>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</ng-template>
|
||||
|
||||
|
@ -28,6 +28,10 @@
|
||||
|
||||
.mat-tab-label {
|
||||
flex-grow: 1;
|
||||
|
||||
.mat-icon + span {
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-ink-bar {
|
||||
|
Loading…
x
Reference in New Issue
Block a user