1.0.3 • Published 6 years ago
flip-number-element v1.0.3
\<flip-number-element>
Polymer 3 element implement number-flip from @gaoryrt
Demo
See: Demo.
In a Polymer 3 element
import {PolymerElement, html} from '@polymer/polymer';
import 'flip-number-element/flip-number-element';
class SampleElement extends PolymerElement {
static get template() {
return html`
<flip-number-element></flip-number-element>
`;
}
}
customElements.define('sample-element', SampleElement); <flip-number-element> provides the following custom properties
for styling:
| Custom property | Description | Default |
|---|---|---|
--flip-number-element-color | Color of the base text | #000 |
--flip-number-element-style | Mixin applied to the flip | {} |
Install the Polymer-CLI
First, make sure you have the Polymer CLI and npm (packaged with Node.js) installed. Run npm install to install your element's dependencies, then run polymer serve to serve your element locally.
Viewing Your Element
$ polymer serveRunning Tests
$ polymer testYour application is already set up to be tested via web-component-tester. Run polymer test to run your application's test suite locally.
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
Credits
Thanks to @gaoryrt number-flip