Last active
August 23, 2020 17:31
-
-
Save deebloo/0984655868055a150299819654c615e7 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
import { component, JoistElement } from '@joist/component'; | |
import { template, html } from '@joist/component/lit-html'; | |
@component({ | |
tagName: 'app-root', | |
shadowDom: 'open', | |
state: { | |
title: 'Hello World' | |
}, | |
styles: [` | |
:host { | |
display: block; | |
} | |
h1 { | |
color: red; | |
} | |
`], | |
render: template(({ state }) => { | |
return html` | |
<h1>${state.title}</h1> | |
` | |
}) | |
}) | |
class AppElement extends JoistElement {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment