@@ -124,32 +124,50 @@ <h4>Text</h4>
124124 < mat-form-field [appearance] ="prefixSuffixAppearance " class ="demo-text-align-end ">
125125 < mat-label > Amount</ mat-label >
126126 < input matInput >
127- < span matPrefix *ngIf ="showPrefix "> $ </ span >
128- < span matSuffix > .00</ span >
127+ < span matTextPrefix *ngIf ="showPrefix "> $</ span >
128+ < span matTextSuffix > .00</ span >
129129 </ mat-form-field >
130130
131131 < h4 > Text (always outline)</ h4 >
132132 < mat-form-field appearance ="outline " class ="demo-text-align-end ">
133133 < mat-label > Amount</ mat-label >
134134 < input matInput >
135- < span matPrefix > $ </ span >
136- < span matSuffix > .00</ span >
135+ < span matTextPrefix > $ </ span >
136+ < span matTextSuffix > .00</ span >
137137 </ mat-form-field >
138138
139139 < h4 > Icons</ h4 >
140140 < mat-form-field [appearance] ="prefixSuffixAppearance ">
141141 < mat-label > Amount</ mat-label >
142142 < 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 >
145145 </ mat-form-field >
146146
147147 < h4 > Icon buttons</ h4 >
148148 < mat-form-field [appearance] ="prefixSuffixAppearance ">
149149 < mat-label > Amount</ mat-label >
150150 < 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 >
153171 </ mat-form-field >
154172
155173 < p >
@@ -371,20 +389,22 @@ <h4>Textarea</h4>
371389 < mat-form-field >
372390 < mat-label > Prefixed</ mat-label >
373391 < input matInput value ="example ">
374- < div matPrefix > Example: </ div >
392+ < span matTextPrefix > Example: </ span >
375393 </ mat-form-field >
376394 < mat-form-field class ="demo-text-align-end ">
377395 < mat-label > Suffixed</ mat-label >
378396 < input matInput value ="123 ">
379- < span matSuffix > .00 €</ span >
397+ < span matTextSuffix > .00 €</ span >
380398 </ mat-form-field >
381399 < br />
382400 Both:
383401 < mat-form-field class ="demo-text-align-end ">
384402 < mat-label > Email address</ mat-label >
385403 < 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 >
388408 </ mat-form-field >
389409 </ p >
390410
@@ -679,8 +699,8 @@ <h3><textarea> with bindable autosize </h3>
679699 < mat-form-field appearance ="outline " class ="demo-text-align-end ">
680700 < mat-label > Amount</ mat-label >
681701 < input matInput >
682- < span matPrefix > $ </ span >
683- < span matSuffix > .00</ span >
702+ < span matTextPrefix > $ </ span >
703+ < span matTextSuffix > .00</ span >
684704 </ mat-form-field >
685705 </ mat-tab >
686706 < mat-tab label ="Tab 2 ">
@@ -692,9 +712,9 @@ <h3><textarea> with bindable autosize </h3>
692712 < mat-form-field appearance ="outline " class ="demo-text-align-end ">
693713 < mat-label > Amount</ mat-label >
694714 < 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 >
698718 </ mat-form-field >
699719 </ mat-tab >
700720 </ mat-tab-group >
@@ -724,7 +744,7 @@ <h4>Custom control</h4>
724744 < mat-form-field appearance ="outline ">
725745 < mat-label > Phone number</ mat-label >
726746 < example-tel-input required > </ example-tel-input >
727- < mat-icon matSuffix > phone</ mat-icon >
747+ < mat-icon matIconSuffix > phone</ mat-icon >
728748 < mat-hint > Include area code</ mat-hint >
729749 </ mat-form-field >
730750 </ p >
0 commit comments