generator-polymer-init-valle-element
Version:
Generator for valle elements using Polymer 2x
42 lines (29 loc) • 715 B
HTML
<link rel="import" href="../polymer/polymer-element.html">
<dom-module id="<%= elementName %>">
<template>
<style>
:host {
display: block;
}
h1 {
@apply (--valle-element-text);
color: var(--valle-element-text-color, #f44277);
}
</style>
<h1>Hello [[prop1]]!</h1>
</template>
<script>
class valleElement extends Polymer.Element {
static get is() { return '<%= elementName %>'; }
static get properties() {
return {
prop1: {
type: String,
value: 'World'
}
};
}
}
window.customElements.define(valleElement.is, valleElement);
</script>
</dom-module>