Published
Edited
Feb 15, 2019
Importers
Insert cell
Insert cell
Insert cell
circleButton({
text: '?',
onClick () { console.info('? pressed') }
})
Insert cell
function circleButton (option = {}) {
const { text = '+', onClick = console.info } = option
const view = html`<button style="
border: solid 1px #555;
border-radius: 16px;
width: 32px;
height: 32px;
font-size: 24px;
cursor: pointer;
background-color: white;
display: inline-flex;
justify-content: center;
">${text}</button>`
view.onclick = (e) => {
onClick(e)
view.dispatchEvent(new CustomEvent('input', { bubbles: true }))
}
return view
}
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more