aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+signup/+register/custom-stepper.component.html
blob: aad2f31d3daa629cb52eccd64794c2d7183b2bc5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<section class="container">
  <header *ngIf="steps.length > 2">
    <ng-container *ngFor="let step of steps; let i = index; let isLast = last;">
      <div
        class="step-info" [ngClass]="{ active: selectedIndex === i, completed: isCompleted(step), 'c-hand': isAccessible(i) }" [attr.aria-current]="selectedIndex === i"
        (click)="onClick(i)"
      >
        <div class="step-index">
          <ng-container *ngIf="!isCompleted(step)"><span class="sr-only" i18n>Step</span> {{ i + 1 }}</ng-container>
          <my-global-icon *ngIf="isCompleted(step)" iconName="tick"></my-global-icon>
        </div>

        <div class="step-label">{{ step.label }}</div>
      </div>

      <!-- Do no display if this is the last child -->
      <div *ngIf="!isLast" class="connector"></div>
    </ng-container>
  </header>

  <div [style.display]="selected ? 'block' : 'none'">
    <ng-container [ngTemplateOutlet]="selected.content"></ng-container>
  </div>

</section>