Skip to content

Commit 0a38d67

Browse files
committed
Fix host style and demo page (#6592)
1 parent 4b39e01 commit 0a38d67

File tree

3 files changed

+8
-28
lines changed

3 files changed

+8
-28
lines changed

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

+6-23
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ <h3>Linear Horizontal Stepper Demo using a different form for each step</h3>
6464

6565
<md-step [stepControl]="emailFormGroup" optional>
6666
<form [formGroup]="emailFormGroup">
67-
<ng-template mdStepLabel>Fill out your phone number</ng-template>
67+
<ng-template mdStepLabel>Fill out your email address</ng-template>
6868
<md-form-field>
6969
<input mdInput placeholder="Email address" formControlName="emailCtrl">
7070
<md-error>The input is invalid</md-error>
@@ -139,10 +139,9 @@ <h3>Vertical Stepper Demo</h3>
139139
</md-step>
140140
</md-vertical-stepper>
141141

142-
<h3>Horizontal Stepper Demo</h3>
142+
<h3>Horizontal Stepper Demo with Text Label</h3>
143143
<md-horizontal-stepper>
144-
<md-step>
145-
<ng-template mdStepLabel>Fill out your name</ng-template>
144+
<md-step label="Fill out your name">
146145
<md-form-field>
147146
<input mdInput placeholder="First Name">
148147
</md-form-field>
@@ -155,8 +154,7 @@ <h3>Horizontal Stepper Demo</h3>
155154
</div>
156155
</md-step>
157156

158-
<md-step>
159-
<ng-template mdStepLabel>Fill out your phone number</ng-template>
157+
<md-step label="Fill out your phone number">
160158
<md-form-field>
161159
<input mdInput placeholder="Phone number">
162160
</md-form-field>
@@ -166,8 +164,7 @@ <h3>Horizontal Stepper Demo</h3>
166164
</div>
167165
</md-step>
168166

169-
<md-step>
170-
<ng-template mdStepLabel>Fill out your address</ng-template>
167+
<md-step label="Fill out your address">
171168
<md-form-field>
172169
<input mdInput placeholder="Address">
173170
</md-form-field>
@@ -177,28 +174,14 @@ <h3>Horizontal Stepper Demo</h3>
177174
</div>
178175
</md-step>
179176

180-
<md-step>
181-
<ng-template mdStepLabel>Confirm your information</ng-template>
177+
<md-step label="Confirm your information">
182178
Everything seems correct.
183179
<div>
184180
<button md-button>Done</button>
185181
</div>
186182
</md-step>
187183
</md-horizontal-stepper>
188184

189-
<h3>Horizontal Stepper Demo</h3>
190-
<md-horizontal-stepper>
191-
<md-step *ngFor="let step of steps" [label]="step.label">
192-
<md-form-field>
193-
<input mdInput placeholder="Answer" [(ngModel)]="step.content">
194-
</md-form-field>
195-
<div>
196-
<button md-button mdStepperPrevious>Back</button>
197-
<button md-button mdStepperNext>Next</button>
198-
</div>
199-
</md-step>
200-
</md-horizontal-stepper>
201-
202185
<h3>Horizontal Stepper Demo with Templated Label</h3>
203186
<md-horizontal-stepper>
204187
<md-step *ngFor="let step of steps">

src/lib/stepper/step-header.scss

-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ $mat-stepper-line-gap: 8px !default;
66
$mat-step-optional-font-size: 12px;
77
$mat-step-header-icon-size: 16px !default;
88

9-
:host {
10-
display: flex;
11-
}
12-
139
.mat-step-optional {
1410
font-size: $mat-step-optional-font-size;
1511
}

src/lib/stepper/stepper.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ $mat-vertical-stepper-content-margin: 36px !default;
77
$mat-stepper-line-width: 1px !default;
88
$mat-stepper-line-gap: 8px !default;
99

10-
:host {
10+
.mat-stepper-vertical,
11+
.mat-stepper-horizontal {
1112
display: block;
1213
}
1314

0 commit comments

Comments
 (0)