aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+signup/+register/custom-stepper.component.html
blob: f2687e520956687e64f921b780b66b301b71600e (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
26
27
28
29
30
31
<section>
  <header *ngIf="steps.length > 2">
    <div class="header-steps">
      <ng-container *ngFor="let step of steps; let i = index; let isLast = last;">
        <button
          class="step-info button-unstyle" [ngClass]="{ active: selectedIndex === i, completed: isCompleted(step) }"
          [disabled]="!isAccessible(step)"
          [attr.aria-current]="selectedIndex === i" (click)="onClick(i)"
        >
          <div class="step-index">
            <span class="visually-hidden" i18n>Step</span> {{ i + 1 }}

            <div class="completed-icon" *ngIf="isCompleted(step)">
              <my-global-icon iconName="tick"></my-global-icon>
            </div>
          </div>

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

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

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

</section>