- From: Janar Palk <notifications@github.com>
- Date: Mon, 01 Apr 2019 08:51:37 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 1 April 2019 15:51:59 UTC
https://github.com/chanar/lit-scss-vaadin ``` // Import the LitElement base class and html helper function import { LitElement, html } from 'lit-element'; import '@vaadin/vaadin-button/vaadin-button.js'; import styles from './my-element.scss'; // Extend the LitElement base class class MyElement extends LitElement { static get properties() { return { prop1: { type: String } }; } render() { return html` <style> ${styles} </style> <div class="wrap"> <vaadin-button theme="primary your-custom-overwrite" @click="${this.fireClickEvent}"> <slot></slot> </vaadin-button> </div> `; } fireClickEvent() { alert('Yesss!!'); this.prop1 = 'prop1 now has a value'; } } // Register the new element with the browser. customElements.define('my-element', MyElement); ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/759#issuecomment-478636280
Received on Monday, 1 April 2019 15:51:59 UTC