Skip to content

Commit d4d0f18

Browse files
committed
refactor(stepper-demo): revert to previous state
1 parent b660c9a commit d4d0f18

File tree

1 file changed

+6
-78
lines changed

1 file changed

+6
-78
lines changed

src/demo-app/stepper/stepper-demo.html

Lines changed: 6 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@
33
<h3>Linear Vertical Stepper Demo using a single form</h3>
44
<form [formGroup]="formGroup">
55
<mat-vertical-stepper #linearVerticalStepper="matVerticalStepper" formArrayName="formArray" [linear]="!isNonLinear">
6-
<mat-step
7-
formGroupName="0"
8-
[stepControl]="formArray?.get([0])"
9-
errorMessage="Some fields are required"
10-
[completed]="true"
11-
>
6+
<mat-step formGroupName="0" [stepControl]="formArray?.get([0])">
127
<ng-template matStepLabel>Fill out your name</ng-template>
138
<mat-form-field>
149
<mat-label>First name</mat-label>
@@ -26,13 +21,7 @@ <h3>Linear Vertical Stepper Demo using a single form</h3>
2621
</div>
2722
</mat-step>
2823

29-
<mat-step
30-
formGroupName="1"
31-
[stepControl]="formArray?.get([1])"
32-
optional
33-
errorMessage="The input is invalid"
34-
[showError]="true"
35-
>
24+
<mat-step formGroupName="1" [stepControl]="formArray?.get([1])" optional>
3625
<ng-template matStepLabel>
3726
<div>Fill out your email address</div>
3827
</ng-template>
@@ -109,7 +98,7 @@ <h3>Linear Horizontal Stepper Demo using a different form for each step</h3>
10998
<h3>Vertical Stepper Demo</h3>
11099
<mat-checkbox [(ngModel)]="isNonEditable">Make steps non-editable</mat-checkbox>
111100
<mat-vertical-stepper>
112-
<mat-step [editable]="!isNonEditable" [completed]="false">
101+
<mat-step [editable]="!isNonEditable">
113102
<ng-template matStepLabel>Fill out your name</ng-template>
114103
<mat-form-field>
115104
<mat-label>First name</mat-label>
@@ -125,7 +114,7 @@ <h3>Vertical Stepper Demo</h3>
125114
</div>
126115
</mat-step>
127116

128-
<mat-step [editable]="!isNonEditable" [completed]="false">
117+
<mat-step [editable]="!isNonEditable">
129118
<ng-template matStepLabel>
130119
<div>Fill out your phone number</div>
131120
</ng-template>
@@ -139,7 +128,7 @@ <h3>Vertical Stepper Demo</h3>
139128
</div>
140129
</mat-step>
141130

142-
<mat-step [editable]="!isNonEditable" [completed]="false">
131+
<mat-step [editable]="!isNonEditable">
143132
<ng-template matStepLabel>
144133
<div>Fill out your address</div>
145134
</ng-template>
@@ -153,7 +142,7 @@ <h3>Vertical Stepper Demo</h3>
153142
</div>
154143
</mat-step>
155144

156-
<mat-step [editable]="!isNonEditable" [completed]="false">
145+
<mat-step>
157146
<ng-template matStepLabel>Confirm your information</ng-template>
158147
Everything seems correct.
159148
<div>
@@ -234,64 +223,3 @@ <h3>Stepper with autosize textarea</h3>
234223
</mat-step>
235224
</mat-horizontal-stepper>
236225

237-
<h3>Stepper with customized state</h3>
238-
<mat-horizontal-stepper [linear]="true">
239-
<mat-step label="Step 1" state="shopping_cart">
240-
<p>Go to your shopping cart.</p>
241-
<div>
242-
<button mat-button matStepperNext>Next</button>
243-
</div>
244-
</mat-step>
245-
<mat-step label="Step 2" state="credit_card">
246-
<p>Enter your credit card information.</p>
247-
<div>
248-
<button mat-button matStepperPrevious>Back</button>
249-
<button mat-button matStepperNext>Next</button>
250-
</div>
251-
</mat-step>
252-
<mat-step label="Step 3" state="receipt">
253-
<p>Get your receipt.</p>
254-
<div>
255-
<button mat-button matStepperPrevious>Back</button>
256-
<button mat-button matStepperNext>Next</button>
257-
</div>
258-
</mat-step>
259-
<mat-step label="Step 4" state="print">
260-
<p>Print your receipt.</p>
261-
<div>
262-
<button mat-button matStepperPrevious>Back</button>
263-
<button mat-button matStepperNext>Next</button>
264-
</div>
265-
</mat-step>
266-
<mat-step label="Step 5">
267-
<p>You've successfully completed your purchase!</p>
268-
</mat-step>
269-
</mat-horizontal-stepper>
270-
271-
<h3>Stepper with customized state with icon overrides</h3>
272-
<mat-horizontal-stepper [linear]="true">
273-
<mat-step label="Step 1" state="phone">
274-
<p>Put down your phones.</p>
275-
<div>
276-
<button mat-button matStepperNext>Next</button>
277-
</div>
278-
</mat-step>
279-
<mat-step label="Step 2" state="chat">
280-
<p>Socialize with each other.</p>
281-
<div>
282-
<button mat-button matStepperPrevious>Back</button>
283-
<button mat-button matStepperNext>Next</button>
284-
</div>
285-
</mat-step>
286-
<mat-step label="Step 3">
287-
<p>You're welcome.</p>
288-
</mat-step>
289-
290-
<!-- Icon overrides. -->
291-
<ng-template matStepperIcon="phone">
292-
<mat-icon>call_end</mat-icon>
293-
</ng-template>
294-
<ng-template matStepperIcon="chat">
295-
<mat-icon>forum</mat-icon>
296-
</ng-template>
297-
</mat-horizontal-stepper>

0 commit comments

Comments
 (0)