Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
61 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
demo/text-field-number-demos.html → demo/number-field-demos.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
<dom-module id="text-field-number-demos"> | ||
<dom-module id="number-field-demos"> | ||
<template> | ||
<style include="vaadin-component-demo-shared-styles"> | ||
:host { | ||
display: block; | ||
} | ||
</style> | ||
|
||
<p>The <code><vaadin-number-field></code> element has all the same features as the <code><vaadin-text-field></code> element plus the additional features listed on this page.</p> | ||
<p>The <code><vaadin-number-field></code> element has all the same features as the <code><vaadin-text-field></code> element plus number validation and the additional features listed on this page.</p> | ||
|
||
|
||
<h3>Basic number field</h3> | ||
<vaadin-demo-snippet id="text-field-number-demos-basic"> | ||
<vaadin-demo-snippet id="number-field-demos-basic"> | ||
<template preserve-content> | ||
<vaadin-number-field></vaadin-number-field> | ||
<vaadin-number-field label="Years of expertise"></vaadin-number-field> | ||
</template> | ||
</vaadin-demo-snippet> | ||
|
||
<h3>Number field with controls</h3> | ||
<vaadin-demo-snippet id="text-field-number-demos-with-controls"> | ||
<vaadin-demo-snippet id="number-field-demos-with-controls"> | ||
<template preserve-content> | ||
<vaadin-number-field has-controls></vaadin-number-field> | ||
</template> | ||
</vaadin-demo-snippet> | ||
|
||
<h3>Number field with value limits</h3> | ||
<vaadin-demo-snippet id="text-field-number-demos-with-limits"> | ||
<vaadin-demo-snippet id="number-field-demos-with-limits"> | ||
<template preserve-content> | ||
<vaadin-number-field value="1" min="1" max="10" has-controls></vaadin-number-field> | ||
</template> | ||
</vaadin-demo-snippet> | ||
|
||
<h3>Number field with step</h3> | ||
<vaadin-demo-snippet id="text-field-number-demos-with-step"> | ||
<vaadin-demo-snippet id="number-field-demos-with-step"> | ||
<template preserve-content> | ||
<vaadin-number-field step="0.2" min="0" max="10" has-controls></vaadin-number-field> | ||
</template> | ||
</vaadin-demo-snippet> | ||
|
||
</template> | ||
<script> | ||
class TextFieldNumberDemos extends DemoReadyEventEmitter(TextFieldDemo(Polymer.Element)) { | ||
class NumberFieldDemos extends DemoReadyEventEmitter(TextFieldDemo(Polymer.Element)) { | ||
static get is() { | ||
return 'text-field-number-demos'; | ||
return 'number-field-demos'; | ||
} | ||
} | ||
customElements.define(TextFieldNumberDemos.is, TextFieldNumberDemos); | ||
customElements.define(NumberFieldDemos.is, NumberFieldDemos); | ||
</script> | ||
</dom-module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters