Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/demo-app/input/input-container-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
<md-card-content>
<md-input-container align="end">
<input mdInput placeholder="amount">
<span md-prefix>$&nbsp;</span>
<span md-suffix>.00</span>
<span mdPrefix>$&nbsp;</span>
<span mdSuffix>.00</span>
</md-input-container>
</md-card-content>
</md-card>
Expand Down Expand Up @@ -189,21 +189,21 @@ <h4>Textarea</h4>
<p>
<md-input-container>
<input mdInput placeholder="Prefixed" value="example">
<div md-prefix>Example:&nbsp;</div>
<div mdPrefix>Example:&nbsp;</div>
</md-input-container>
<md-input-container align="end">
<input mdInput placeholder="Suffixed" value="123">
<span md-suffix>.00 €</span>
<span mdSuffix>.00 €</span>
</md-input-container>
<br/>
Both:
<md-input-container align="end">
<input mdInput #email placeholder="Email Address" value="angular-core">
<span md-prefix>
<span mdPrefix>
<md-icon [class.primary]="email.focused" class="demo-icons demo-transform">email</md-icon>
&nbsp;
</span>
<span md-suffix class="demo-transform" [class.primary]="email.focused">
<span mdSuffix class="demo-transform" [class.primary]="email.focused">
&nbsp;@gmail.com
</span>
</md-input-container>
Expand Down
12 changes: 6 additions & 6 deletions src/demo-app/input/input-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<md-toolbar color="primary">Prefix + Suffix</md-toolbar>
<md-card-content>
<md-input placeholder="amount" align="end">
<span md-prefix>$&nbsp;</span>
<span md-suffix>.00</span>
<span mdPrefix>$&nbsp;</span>
<span mdSuffix>.00</span>
</md-input>
</md-card-content>
</md-card>
Expand Down Expand Up @@ -131,16 +131,16 @@ <h4>Textarea</h4>

<p>
<md-input placeholder="Prefixed" value="example">
<div md-prefix>Example:&nbsp;</div>
<div mdPrefix>Example:&nbsp;</div>
</md-input>
<md-input placeholder="Suffixed" value="123" align="end">
<span md-suffix>.00 €</span>
<span mdSuffix>.00 €</span>
</md-input>
<br/>
Both:
<md-input #email placeholder="Email Address" value="angular-core" align="end">
<span md-prefix><md-icon [class.primary]="email.focused" class="demo-icons demo-transform">email</md-icon>&nbsp;</span>
<span md-suffix class="demo-transform" [class.primary]="email.focused">&nbsp;@gmail.com</span>
<span mdPrefix><md-icon [class.primary]="email.focused" class="demo-icons demo-transform">email</md-icon>&nbsp;</span>
<span mdSuffix class="demo-transform" [class.primary]="email.focused">&nbsp;@gmail.com</span>
</md-input>
</p>

Expand Down
4 changes: 2 additions & 2 deletions src/lib/input/OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ attribute on the `input` or `textarea`, or using an `md-placeholder` element in
HTML can be included before, and after the input tag, as prefix or suffix. It will be underlined as
per the Material specification, and clicking it will focus the input.

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

### Hint Labels

Expand Down
8 changes: 4 additions & 4 deletions src/lib/input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ attribute on the `input` or `textarea`, or using an `md-placeholder` element in
You can include HTML before, and after the input tag, as prefix or suffix. It will be underlined as
per the Material specification, and clicking it will focus the input.

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

```html
<md-input-container align="end">
<input mdInput placeholder="amount">
<span md-prefix>$&nbsp;</span>
<span md-suffix>.00</span>
<span mdPrefix>$&nbsp;</span>
<span mdSuffix>.00</span>
</md-input-container>
```

Expand Down
4 changes: 2 additions & 2 deletions src/lib/input/input-container.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="md-input-wrapper">
<div class="md-input-table">
<div class="md-input-prefix"><ng-content select="[md-prefix]"></ng-content></div>
<div class="md-input-prefix"><ng-content select="[mdPrefix], [md-prefix]"></ng-content></div>

<div class="md-input-infix" [class.md-end]="align == 'end'">
<ng-content selector="input, textarea"></ng-content>
Expand All @@ -19,7 +19,7 @@
</label>
</div>

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

<div class="md-input-underline"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/input/input.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="md-input-wrapper">
<div class="md-input-table">
<div class="md-input-prefix"><ng-content select="[md-prefix]"></ng-content></div>
<div class="md-input-prefix"><ng-content select="[mdPrefix], [md-prefix]"></ng-content></div>

<div class="md-input-infix">
<input #input
Expand Down Expand Up @@ -80,7 +80,7 @@
</label>
</div>

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

<div class="md-input-underline"
Expand Down