Skip to content

Instantly share code, notes, and snippets.

@timwis timwis/index.js
Created Aug 18, 2017

Embed
What would you like to do?
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
You can’t perform that action at this time.