@@ -124,32 +124,50 @@ <h4>Text</h4>
124
124
< mat-form-field [appearance] ="prefixSuffixAppearance " class ="demo-text-align-end ">
125
125
< mat-label > Amount</ mat-label >
126
126
< input matInput >
127
- < span matPrefix *ngIf ="showPrefix "> $ </ span >
128
- < span matSuffix > .00</ span >
127
+ < span matTextPrefix *ngIf ="showPrefix "> $</ span >
128
+ < span matTextSuffix > .00</ span >
129
129
</ mat-form-field >
130
130
131
131
< h4 > Text (always outline)</ h4 >
132
132
< mat-form-field appearance ="outline " class ="demo-text-align-end ">
133
133
< mat-label > Amount</ mat-label >
134
134
< input matInput >
135
- < span matPrefix > $ </ span >
136
- < span matSuffix > .00</ span >
135
+ < span matTextPrefix > $ </ span >
136
+ < span matTextSuffix > .00</ span >
137
137
</ mat-form-field >
138
138
139
139
< h4 > Icons</ h4 >
140
140
< mat-form-field [appearance] ="prefixSuffixAppearance ">
141
141
< mat-label > Amount</ mat-label >
142
142
< input matInput >
143
- < mat-icon matPrefix *ngIf ="showPrefix "> calendar_today</ mat-icon >
144
- < mat-icon matSuffix > mode_edit</ mat-icon >
143
+ < mat-icon matIconPrefix *ngIf ="showPrefix "> calendar_today</ mat-icon >
144
+ < mat-icon matIconSuffix > mode_edit</ mat-icon >
145
145
</ mat-form-field >
146
146
147
147
< h4 > Icon buttons</ h4 >
148
148
< mat-form-field [appearance] ="prefixSuffixAppearance ">
149
149
< mat-label > Amount</ mat-label >
150
150
< input matInput >
151
- < button mat-icon-button matPrefix *ngIf ="showPrefix "> < mat-icon > calendar_today</ mat-icon > </ button >
152
- < button mat-icon-button matSuffix > < mat-icon > mode_edit</ mat-icon > </ button >
151
+ < button mat-icon-button matIconPrefix *ngIf ="showPrefix ">
152
+ < mat-icon > calendar_today</ mat-icon >
153
+ </ button >
154
+ < button mat-icon-button matIconSuffix >
155
+ < mat-icon > mode_edit</ mat-icon >
156
+ </ button >
157
+ </ mat-form-field >
158
+
159
+ < h4 > Text & Icons</ h4 >
160
+ < mat-form-field [appearance] ="prefixSuffixAppearance ">
161
+ < mat-label > Amount</ mat-label >
162
+ < input matInput >
163
+ < span matTextPrefix > $</ span >
164
+ < span matTextSuffix > .00</ span >
165
+ < button mat-icon-button matIconPrefix *ngIf ="showPrefix ">
166
+ < mat-icon > calendar_today</ mat-icon >
167
+ </ button >
168
+ < button mat-icon-button matIconSuffix >
169
+ < mat-icon > mode_edit</ mat-icon >
170
+ </ button >
153
171
</ mat-form-field >
154
172
155
173
< p >
@@ -371,20 +389,22 @@ <h4>Textarea</h4>
371
389
< mat-form-field >
372
390
< mat-label > Prefixed</ mat-label >
373
391
< input matInput value ="example ">
374
- < div matPrefix > Example: </ div >
392
+ < span matTextPrefix > Example: </ span >
375
393
</ mat-form-field >
376
394
< mat-form-field class ="demo-text-align-end ">
377
395
< mat-label > Suffixed</ mat-label >
378
396
< input matInput value ="123 ">
379
- < span matSuffix > .00 €</ span >
397
+ < span matTextSuffix > .00 €</ span >
380
398
</ mat-form-field >
381
399
< br />
382
400
Both:
383
401
< mat-form-field class ="demo-text-align-end ">
384
402
< mat-label > Email address</ mat-label >
385
403
< input matInput #email ="matInput " value ="angular-core ">
386
- < span matPrefix > < mat-icon [class.primary] ="email.focused "> email</ mat-icon > </ span >
387
- < span matSuffix [class.primary] ="email.focused "> @gmail.com</ span >
404
+ < span matIconPrefix >
405
+ < mat-icon [class.primary] ="email.focused "> email</ mat-icon >
406
+ </ span >
407
+ < span matTextSuffix [class.primary] ="email.focused "> @gmail.com</ span >
388
408
</ mat-form-field >
389
409
</ p >
390
410
@@ -679,8 +699,8 @@ <h3><textarea> with bindable autosize </h3>
679
699
< mat-form-field appearance ="outline " class ="demo-text-align-end ">
680
700
< mat-label > Amount</ mat-label >
681
701
< input matInput >
682
- < span matPrefix > $ </ span >
683
- < span matSuffix > .00</ span >
702
+ < span matTextPrefix > $ </ span >
703
+ < span matTextSuffix > .00</ span >
684
704
</ mat-form-field >
685
705
</ mat-tab >
686
706
< mat-tab label ="Tab 2 ">
@@ -692,9 +712,9 @@ <h3><textarea> with bindable autosize </h3>
692
712
< mat-form-field appearance ="outline " class ="demo-text-align-end ">
693
713
< mat-label > Amount</ mat-label >
694
714
< input matInput >
695
- < span matPrefix > $ </ span >
696
- < span matPrefix *ngIf ="showSecondPrefix "> ! </ span >
697
- < span matSuffix > .00</ span >
715
+ < span matTextPrefix > $ </ span >
716
+ < span matTextPrefix *ngIf ="showSecondPrefix "> ! </ span >
717
+ < span matTextSuffix > .00</ span >
698
718
</ mat-form-field >
699
719
</ mat-tab >
700
720
</ mat-tab-group >
@@ -724,7 +744,7 @@ <h4>Custom control</h4>
724
744
< mat-form-field appearance ="outline ">
725
745
< mat-label > Phone number</ mat-label >
726
746
< example-tel-input required > </ example-tel-input >
727
- < mat-icon matSuffix > phone</ mat-icon >
747
+ < mat-icon matIconSuffix > phone</ mat-icon >
728
748
< mat-hint > Include area code</ mat-hint >
729
749
</ mat-form-field >
730
750
</ p >
0 commit comments