core/stepper/stepper-progress.component.ts
selector | c8y-stepper-progress |
templateUrl | ./stepper-progress.component.html |
Methods |
Inputs |
Outputs |
index
|
The index of the current step
Type : |
selected
|
Whether the step is cuurently selected or not
Type : |
state
|
The current state of the step
Type : |
onStepClicked
|
Emits the index: number of the step which was clicked $event Type: EventEmitter
|
stepSelected |
stepSelected()
|
Called on click and emits the step index
Returns :
void
|
<button
type="button"
class="c8y-step"
[ngClass]="{ active: selected, 'step-done': state === 'done' || state === '_done' }"
[ngSwitch]="!!(iconOverrides && iconOverrides[state])"
(click)="stepSelected()"
>
<ng-container *ngSwitchCase="true" [ngTemplateOutlet]="iconOverrides[state]"></ng-container>
<ng-container *ngSwitchDefault [ngSwitch]="state">
<span *ngSwitchCase="'edit'">
<span [c8yIcon]="'edit'"></span>
</span>
<span *ngSwitchCase="'done'">
<span [c8yIcon]="'check'"></span>
</span>
<span *ngSwitchDefault> {{ index + 1 }} </span>
</ng-container>
</button>