-
Notifications
You must be signed in to change notification settings - Fork 3
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
felix
committed
Jun 11, 2017
1 parent
30606da
commit 593478e
Showing
1 changed file
with
36 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,45 @@ | ||
# \<paper-relative-integer-input\> | ||
|
||
A Material Design input for number (Polymer 1.9 - 2.x) | ||
|
||
## Install the Polymer-CLI | ||
|
||
First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) installed. Then run `polymer serve` to serve your element locally. | ||
|
||
## Viewing Your Element | ||
A Material Design input field for relative integer with step up/down buttons (Polymer 1.9 - 2.x). | ||
|
||
<!-- | ||
``` | ||
<custom-element-demo> | ||
<template> | ||
<link rel="import" href="paper-relative-integer-input.html"> | ||
<link rel="import" href="../iron-icons/iron-icons.html"> | ||
<next-code-block></next-code-block> | ||
</template> | ||
</custom-element-demo> | ||
``` | ||
$ polymer serve | ||
--> | ||
```html | ||
<style> | ||
paper-relative-integer-input { | ||
max-width: 140px; | ||
margin: auto; | ||
} | ||
</style> | ||
<paper-relative-integer-input | ||
label="Quantity" | ||
min="1" | ||
max="12" | ||
value="6" | ||
step="2" | ||
fallback-value="1" | ||
><paper-relative-integer-input> | ||
``` | ||
|
||
## Running Tests | ||
## Installation | ||
|
||
```bash | ||
bower install -S Zecat/paper-relative-integer-input | ||
``` | ||
$ polymer test | ||
``` | ||
|
||
Your application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally. | ||
## Usage | ||
|
||
For icons to appear, you can either: | ||
|
||
- just import the iron-icons/iron-icons.html Polymer element - it is a dependency of this element but not imported by default | ||
- create your own icon set and specify `stepDownIcon` and `stepUpIcon` properties according | ||
- import paper-relative-integer-input/paper-relative-integer-input-icons and define `stepDownIcon` as 'integer-input:step-down' and `stepUpIcon` as 'integer-input:step-up' |