columns = (args) => {
const form = html`<form></form>`
form.value = {}
let cols = 0
for (const key in args) {
form.appendChild(args[key])
cols++
}
form.style = `display: grid; grid-gap: 10px 15px; grid-template-columns: repeat(${cols}, auto); grid-auto-flow: row;`
form.oninput = () => {
form.value = Object.keys(args).reduce((result, key) => {
result[key] = args[key].value
return result
}, Array.isArray(args) ? [] : {})
}
form.oninput()
return form
}