Last active
April 19, 2019 02:04
-
-
Save falsandtru/cdf4a19b70012b0d6e3c9e1ec021e557 to your computer and use it in GitHub Desktop.
Example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Shadow, HTML, El } from 'typed-dom'; | |
class Component implements El { | |
private readonly dom = Shadow.section({ | |
style: HTML.style(`ul { width: 100px; }`), | |
content: HTML.ul([ | |
HTML.li(`item`), | |
]), | |
}); | |
public readonly element = this.dom.element; | |
public get children() { | |
return this.dom.children.content.children; | |
} | |
public set children(children) { | |
this.dom.children.content.children = children; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment