Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib/stepper/step-header.html
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
<div class="mat-step-header-ripple" mat-ripple [matRippleTrigger]="_getHostElement()"></div>
<div class="mat-step-icon-state-{{state}} mat-step-icon" [class.mat-step-icon-selected]="selected"
<div class="mat-step-icon-state-{{state}} mat-step-icon mat-step-icon-content" [class.mat-step-icon-selected]="selected"
[ngSwitch]="state">
<ng-container *ngSwitchCase="'number'" [ngSwitch]="!!(iconOverrides && iconOverrides.number)">
<ng-container
*ngSwitchCase="true"
[ngTemplateOutlet]="iconOverrides.number"
[ngTemplateOutletContext]="_getIconContext()"></ng-container>
<span class="mat-step-icon-content" *ngSwitchDefault>{{index + 1}}</span>
<span *ngSwitchDefault>{{index + 1}}</span>
</ng-container>

<ng-container *ngSwitchCase="'edit'" [ngSwitch]="!!(iconOverrides && iconOverrides.edit)">
<ng-container
*ngSwitchCase="true"
[ngTemplateOutlet]="iconOverrides.edit"
[ngTemplateOutletContext]="_getIconContext()"></ng-container>
<mat-icon class="mat-step-icon-content" *ngSwitchDefault>create</mat-icon>
<mat-icon *ngSwitchDefault>create</mat-icon>
</ng-container>

<ng-container *ngSwitchCase="'done'" [ngSwitch]="!!(iconOverrides && iconOverrides.done)">
<ng-container
*ngSwitchCase="true"
[ngTemplateOutlet]="iconOverrides.done"
[ngTemplateOutletContext]="_getIconContext()"></ng-container>
<mat-icon class="mat-step-icon-content" *ngSwitchDefault>done</mat-icon>
<mat-icon *ngSwitchDefault>done</mat-icon>
</ng-container>

<ng-container *ngSwitchCase="'error'" [ngSwitch]="!!(iconOverrides && iconOverrides.error)">
Expand Down
3 changes: 2 additions & 1 deletion src/lib/stepper/step-header.scss
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,7 +30,8 @@ $mat-step-header-icon-size: 16px !default;
position: relative;
}

.mat-step-icon-content {
.mat-step-icon-content mat-icon,
.mat-step-icon-content span {
// Use absolute positioning to center the content, because it works better with text.
position: absolute;
top: 50%;
Expand Down