Last active
February 28, 2017 19:22
-
-
Save blasten/e505f5d8406d72c4a35f2108569c2164 to your computer and use it in GitHub Desktop.
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
export class SideBar extends HTMLElement { | |
static render({ name } = props) { | |
return <div>{name}</div>; | |
} | |
} | |
customElements.define('side-bar', SideBar); | |
export class ListView extends HTMLElement { | |
static render({ items } = props) { | |
return items.map(item => <side-bar name={item.name}></side-bar>); | |
} | |
} | |
customElements.define('list-view', ListView); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment