File

core/stepper/stepper-progress.component.ts

Metadata

Index

Methods
Inputs
Outputs

Inputs

iconOverrides
Type : literal type

List of overriden icons as TemplateRef. Also default icons could be overriden. The given overriden icons will replace an icon with matching state: StepState

<ng-container *ngSwitchCase="true" [ngTemplateOutlet]="iconOverrides[state]"

index
Type : number

The index of the current step

selected
Type : boolean

Whether the step is cuurently selected or not

state
Type : StepState

The current state of the step

Outputs

onStepClicked
Type : EventEmitter

Emits the index: number of the step which was clicked

Methods

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',
    'step-error': state === 'error',
    'step-warning': state === 'warning'
  }"
  [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 class="m-t-4" [c8yIcon]="'check'"></span>
    </span>
    <span *ngSwitchDefault> {{ index + 1 }} </span>
  </ng-container>
</button>

results matching ""

    No results matching ""