Skip to content

Commit 3db58c9

Browse files
committed
add icons example
1 parent 449e358 commit 3db58c9

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

docs/src/pages/components/Input.vue

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,62 @@
258258
</div>
259259
</example-box>
260260

261+
<example-box card-title="Icons">
262+
<div slot="demo">
263+
<form novalidate @submit.stop.prevent="submit">
264+
<md-input-container>
265+
<md-icon class="md-warn">
266+
warning
267+
<md-tooltip>Be careful. You're almost broken!</md-tooltip>
268+
</md-icon>
269+
<label>Money</label>
270+
<md-input type="text"></md-input>
271+
<md-icon>attach_money</md-icon>
272+
</md-input-container>
273+
274+
<md-input-container>
275+
<md-icon>phone</md-icon>
276+
<label>Phone</label>
277+
<md-input type="tel"></md-input>
278+
</md-input-container>
279+
280+
<md-input-container>
281+
<md-icon>speaker_notes</md-icon>
282+
<label>Notes</label>
283+
<md-textarea></md-textarea>
284+
</md-input-container>
285+
</form>
286+
</div>
287+
288+
<div slot="code">
289+
<code-block lang="xml">
290+
&lt;form novalidate @submit.stop.prevent=&quot;submit&quot;&gt;
291+
&lt;md-input-container&gt;
292+
&lt;md-icon class=&quot;md-warn&quot;&gt;
293+
warning
294+
&lt;md-tooltip&gt;Be careful. You&#039;re almost broken!&lt;/md-tooltip&gt;
295+
&lt;/md-icon&gt;
296+
&lt;label&gt;Money&lt;/label&gt;
297+
&lt;md-input type=&quot;text&quot;&gt;&lt;/md-input&gt;
298+
&lt;md-icon&gt;attach_money&lt;/md-icon&gt;
299+
&lt;/md-input-container&gt;
300+
301+
&lt;md-input-container&gt;
302+
&lt;md-icon&gt;phone&lt;/md-icon&gt;
303+
&lt;label&gt;Phone&lt;/label&gt;
304+
&lt;md-input type=&quot;tel&quot;&gt;&lt;/md-input&gt;
305+
&lt;/md-input-container&gt;
306+
307+
&lt;md-input-container&gt;
308+
&lt;md-icon&gt;speaker_notes&lt;/md-icon&gt;
309+
&lt;label&gt;Notes&lt;/label&gt;
310+
&lt;md-textarea&gt;&lt;/md-textarea&gt;
311+
&lt;/md-input-container&gt;
312+
&lt;/form&gt;
313+
</code-block>
314+
</div>
315+
</example-box>
316+
261317
<example-box card-title="Required and Errors">
262318
<div slot="demo">
263319
<form novalidate @submit.stop.prevent="submit">

src/components/mdInputContainer/mdInputContainer.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ $input-size: 32px;
9898
}
9999

100100
.md-icon {
101+
margin: 4px auto;
101102
color: rgba(#000, .54);
102103
transition: $swift-ease-out;
103104

0 commit comments

Comments
 (0)