h-buttons

0.0.4 • Public • Published

h buttons

Buttons made with a hyperscript style renderer and csjs.

demo

http://demos.nichoth.com/h-buttons

example

var h = require('bel').createElement
var buttonStyle = require('../index.csjs')
var csjs = require('csjs')
 
var style = csjs`
  .my-button extends ${buttonStyle['h-button-delete']} {
    width: 2em;
    height: 2em;
  }
`
 
function renderButton() {
  return h('button', {
    className: style['my-button'],
    onclick: console.log.bind(console, 'delete')
  }, [])
}
 
document.body.appendChild(renderButton())

Package Sidebar

Install

npm i h-buttons

Weekly Downloads

2

Version

0.0.4

License

ISC

Last publish

Collaborators

  • nichoth