import { customElement, property, html, TemplateResult, LitElement } from 'lit-element'; import * as domtools from '@designestate/dees-domtools'; @customElement('dees-input-quantityselector') export class DeesInputQuantitySelector extends LitElement { public static demo = () => html``; @property() public key: string; @property({ type: Number }) public value: number = 1; public render(): TemplateResult { return html` ${domtools.elementBasic.styles}
-
${this.value}
+
`; } public increase () { this.value++; } public decrease () { if (this.value > 0) { this.value--; } else { // nothing to do here } } }