JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q12062F
  • License ISC

csjs styles for buttons

Package Exports

  • h-buttons

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (h-buttons) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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())