Bernhard
07/12/2024, 3:39 PMArtem Kobzar
07/12/2024, 3:57 PMturansky
07/14/2024, 3:30 PMturansky
07/14/2024, 3:34 PMBernhard
07/14/2024, 3:35 PMimport {LitElement, css, html} from 'lit';
import {customElement, property} from 'lit/decorators.js';
@customElement('simple-greeting')
export class SimpleGreeting extends LitElement {
// Define scoped styles right with your component, in plain CSS
static styles = css`
:host {
color: blue;
}
`;
// Declare reactive properties
@property()
name?: string = 'World';
// Render the UI as a function of component state
render() {
return html`<p>Hello, ${this.name}!</p>`;
}
}
Bernhard
07/14/2024, 3:35 PMBernhard
07/14/2024, 3:36 PMBernhard
07/14/2024, 3:36 PMturansky
07/14/2024, 3:38 PM@customElement
-> CustomElementData
+ some initialization logicBernhard
07/14/2024, 3:38 PMturansky
07/14/2024, 3:38 PM@property
in Kotlin can be implemented in different ways and I would preffer to use custom at startturansky
07/14/2024, 3:46 PMthe main big features I want are templates, styles and some event handlersIf you use Kotlin Wrappers - you will need 2 additional builders: 1. For HTML (we have similar in React) 2. For CSS (we have similar in React) - or you want styles as text block?
Bernhard
07/14/2024, 3:46 PMBernhard
07/14/2024, 3:46 PMturansky
07/16/2024, 9:39 AMBernhard
07/16/2024, 12:22 PM