/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/material/stepper/step-header.html
51 строка
2 KB
Kristiyan Kostadinov
fix(material/stepper): handle empty label in horizontal stepper (#31665)
07 авг 2025, 16:50
Не верифицирован
07 авг 2025, 16:50
24e191a
Код
Авторство
О чём код?
<div class="mat-step-header-ripple mat-focus-indicator" matRipple [matRippleTrigger]="_getHostElement()" [matRippleDisabled]="disableRipple"></div> <div class="mat-step-icon-state-{{state}} mat-step-icon" [class.mat-step-icon-selected]="selected"> <div class="mat-step-icon-content"> @if (iconOverrides && iconOverrides[state]) { <ng-container [ngTemplateOutlet]="iconOverrides[state]" [ngTemplateOutletContext]="{index, active, optional}"></ng-container> } @else { @switch (state) { @case ('number') { <span aria-hidden="true">{{_getDefaultTextForState(state)}}</span> } @default { @if (state === 'done') { <span class="cdk-visually-hidden">{{_intl.completedLabel}}</span> } @else if (state === 'edit') { <span class="cdk-visually-hidden">{{_intl.editableLabel}}</span> } <mat-icon aria-hidden="true">{{_getDefaultTextForState(state)}}</mat-icon> } } } </div> </div> <div class="mat-step-label" [class.mat-step-label-active]="active" [class.mat-step-label-selected]="selected" [class.mat-step-label-error]="state == 'error'"> @if (_templateLabel(); as templateLabel) { <!-- If there is a label template, use it. --> <div class="mat-step-text-label"> <ng-container [ngTemplateOutlet]="templateLabel.template"></ng-container> </div> } @else if (_stringLabel()) { <!-- If there is no label template, fall back to the text label. --> <div class="mat-step-text-label">{{label}}</div> } @if (_hasOptionalLabel()) { <div class="mat-step-optional">{{_intl.optionalLabel}}</div> } @if (_hasErrorLabel()) { <div class="mat-step-sub-label-error">{{errorMessage}}</div> } </div>