feat: implement loading state for checkout process and enhance stepper component

This commit is contained in:
2026-07-28 09:25:04 -03:00
parent c41c60f349
commit 7845c8f20e
6 changed files with 219 additions and 49 deletions

View File

@@ -1,4 +1,10 @@
import { ChangeDetectionStrategy, Component, contentChildren, signal } from '@angular/core';
import {
ChangeDetectionStrategy,
Component,
contentChildren,
input,
linkedSignal,
} from '@angular/core';
import { StepComponent } from './step.component';
import { NgClass } from '@angular/common';
@@ -11,7 +17,8 @@ import { NgClass } from '@angular/common';
})
export class StepperComponent {
readonly steps = contentChildren(StepComponent);
readonly currentStepIndex = signal(0);
readonly initialStepIndex = input(0);
readonly currentStepIndex = linkedSignal(() => this.initialStepIndex());
next() {
const currentSteps = this.steps();