import { customElement, LitElement, TemplateResult, property, html } from 'lit-element'; import * as domtools from '@designestate/dees-domtools'; @customElement('dees-input-checkbox') export class DeesInputCheckbox extends LitElement { public static demo = () => html``; @property() public key: string; @property() public label: string = 'Label'; @property() public value: boolean = false; public render(): TemplateResult { return html` ${domtools.elementBasic.styles}
${this.value ? html`
` : html``}
${this.label}
`; } public async toggleSelected() { this.value = !this.value; this.dispatchEvent( new CustomEvent('newValue', { detail: this.value, bubbles: true, }) ); } }