brisky-props
v1.2.4
Published
Adds attributes to Brisky
Downloads
14
Readme
brisky-props
Set attributes on brisky-elements
const render = require('brisky/render')
const s = require('vigour-state/s')
const state = s({ thumb: 'cat' })
const app = render({
img: {
tag: 'img',
props: {
src: {
$: 'thumb',
$tansform: (val) => `http://bla.com/${val}.jpg`
}
}
}
}, state)
document.body.appendChild(app)
state.cat.thumb('dog') // → changes thumb to dog