Skip to content

Instantly share code, notes, and snippets.

@timwis
Created August 18, 2017 11:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save timwis/8d45100a09d5fb2f64d9b7f8e6f7096f to your computer and use it in GitHub Desktop.
const html = require('bel')
window.CustomButton = function (props) {
console.log('Called CustomButton', props)
return html`
<button style="background-color: ${props.color}">
${props.label}
</button>
`
}
const tree = html`
<div>
<CustomButton color="red" label="Add" />
</div>
`
document.body.appendChild(tree)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment