Skip to content

Commit 7562322

Browse files
devversionmmalerba
authored andcommitted
fix(input): camel-case md-prefix and md-suffix (#2639)
* Renames the md-prefix and md-suffix directives to camelcase. Closes #2636 BREAKING CHANGE: md-prefix and md-suffix are now mdPrefix and mdSuffix
1 parent 29d9d59 commit 7562322

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

src/demo-app/input/input-container-demo.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
<md-card-content>
5454
<md-input-container align="end">
5555
<input mdInput placeholder="amount">
56-
<span md-prefix>$&nbsp;</span>
57-
<span md-suffix>.00</span>
56+
<span mdPrefix>$&nbsp;</span>
57+
<span mdSuffix>.00</span>
5858
</md-input-container>
5959
</md-card-content>
6060
</md-card>
@@ -189,21 +189,21 @@ <h4>Textarea</h4>
189189
<p>
190190
<md-input-container>
191191
<input mdInput placeholder="Prefixed" value="example">
192-
<div md-prefix>Example:&nbsp;</div>
192+
<div mdPrefix>Example:&nbsp;</div>
193193
</md-input-container>
194194
<md-input-container align="end">
195195
<input mdInput placeholder="Suffixed" value="123">
196-
<span md-suffix>.00 €</span>
196+
<span mdSuffix>.00 €</span>
197197
</md-input-container>
198198
<br/>
199199
Both:
200200
<md-input-container align="end">
201201
<input mdInput #email placeholder="Email Address" value="angular-core">
202-
<span md-prefix>
202+
<span mdPrefix>
203203
<md-icon [class.primary]="email.focused" class="demo-icons demo-transform">email</md-icon>
204204
&nbsp;
205205
</span>
206-
<span md-suffix class="demo-transform" [class.primary]="email.focused">
206+
<span mdSuffix class="demo-transform" [class.primary]="email.focused">
207207
&nbsp;@gmail.com
208208
</span>
209209
</md-input-container>

src/demo-app/input/input-demo.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
<md-toolbar color="primary">Prefix + Suffix</md-toolbar>
3131
<md-card-content>
3232
<md-input placeholder="amount" align="end">
33-
<span md-prefix>$&nbsp;</span>
34-
<span md-suffix>.00</span>
33+
<span mdPrefix>$&nbsp;</span>
34+
<span mdSuffix>.00</span>
3535
</md-input>
3636
</md-card-content>
3737
</md-card>
@@ -133,16 +133,16 @@ <h4>Textarea</h4>
133133

134134
<p>
135135
<md-input placeholder="Prefixed" value="example">
136-
<div md-prefix>Example:&nbsp;</div>
136+
<div mdPrefix>Example:&nbsp;</div>
137137
</md-input>
138138
<md-input placeholder="Suffixed" value="123" align="end">
139-
<span md-suffix>.00 €</span>
139+
<span mdSuffix>.00 €</span>
140140
</md-input>
141141
<br/>
142142
Both:
143143
<md-input #email placeholder="Email Address" value="angular-core" align="end">
144-
<span md-prefix><md-icon [class.primary]="email.focused" class="demo-icons demo-transform">email</md-icon>&nbsp;</span>
145-
<span md-suffix class="demo-transform" [class.primary]="email.focused">&nbsp;@gmail.com</span>
144+
<span mdPrefix><md-icon [class.primary]="email.focused" class="demo-icons demo-transform">email</md-icon>&nbsp;</span>
145+
<span mdSuffix class="demo-transform" [class.primary]="email.focused">&nbsp;@gmail.com</span>
146146
</md-input>
147147
</p>
148148

src/lib/input/OVERVIEW.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ attribute on the `input` or `textarea`, or using an `md-placeholder` element in
5050
HTML can be included before, and after the input tag, as prefix or suffix. It will be underlined as
5151
per the Material specification, and clicking it will focus the input.
5252

53-
Adding the `md-prefix` attribute to an element inside the `md-input-container` will designate it as
54-
the prefix. Similarly, adding `md-suffix` will designate it as the suffix.
53+
Adding the `mdPrefix` attribute to an element inside the `md-input-container` will designate it as
54+
the prefix. Similarly, adding `mdSuffix` will designate it as the suffix.
5555

5656
### Hint Labels
5757

src/lib/input/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ attribute on the `input` or `textarea`, or using an `md-placeholder` element in
6868
You can include HTML before, and after the input tag, as prefix or suffix. It will be underlined as
6969
per the Material specification, and clicking it will focus the input.
7070

71-
To add a prefix, use the `md-prefix` attribute on the element. Similarly, to add a suffix, use the
72-
`md-suffix` attribute. For example, in a template:
71+
To add a prefix, use the `mdPrefix` attribute on the element. Similarly, to add a suffix, use the
72+
`mdSuffix` attribute. For example, in a template:
7373

7474
```html
7575
<md-input-container align="end">
7676
<input mdInput placeholder="amount">
77-
<span md-prefix>$&nbsp;</span>
78-
<span md-suffix>.00</span>
77+
<span mdPrefix>$&nbsp;</span>
78+
<span mdSuffix>.00</span>
7979
</md-input-container>
8080
```
8181

src/lib/input/input-container.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="md-input-wrapper">
22
<div class="md-input-table">
3-
<div class="md-input-prefix"><ng-content select="[md-prefix]"></ng-content></div>
3+
<div class="md-input-prefix"><ng-content select="[mdPrefix], [md-prefix]"></ng-content></div>
44

55
<div class="md-input-infix" [class.md-end]="align == 'end'">
66
<ng-content selector="input, textarea"></ng-content>
@@ -19,7 +19,7 @@
1919
</label>
2020
</div>
2121

22-
<div class="md-input-suffix"><ng-content select="[md-suffix]"></ng-content></div>
22+
<div class="md-input-suffix"><ng-content select="[mdSuffix], [md-suffix]"></ng-content></div>
2323
</div>
2424

2525
<div class="md-input-underline"

src/lib/input/input.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="md-input-wrapper">
22
<div class="md-input-table">
3-
<div class="md-input-prefix"><ng-content select="[md-prefix]"></ng-content></div>
3+
<div class="md-input-prefix"><ng-content select="[mdPrefix], [md-prefix]"></ng-content></div>
44

55
<div class="md-input-infix">
66
<input #input
@@ -80,7 +80,7 @@
8080
</label>
8181
</div>
8282

83-
<div class="md-input-suffix"><ng-content select="[md-suffix]"></ng-content></div>
83+
<div class="md-input-suffix"><ng-content select="[mdSuffix], [md-suffix]"></ng-content></div>
8484
</div>
8585

8686
<div class="md-input-underline"

0 commit comments

Comments
 (0)