brisky-props

1.2.4 • Public • Published

brisky-props

Build Status js-standard-style npm version Coverage Status

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

Package Sidebar

Install

npm i brisky-props

Weekly Downloads

6

Version

1.2.4

License

ISC

Last publish

Collaborators

  • vigour-io