@resonate/button
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

@resonate/button

Render an HTML button element

Install

$ npm i --save @resonate/button

Usage

const button = require('@resonate/button')

const myButton = button({
  style: 'blank',
  prefix: 'play-button',
  onClick: () => {
    // do something
  },
  title: playing ? 'Pause' : 'Play',
  iconName: playing ? 'pause' : 'play'
})

document.body.appendChild(myButton)

Options

  • prefix A single class or classlist
  • onClick Button onclick event handler
  • value Button value
  • type Button type (default is 'button')
  • disabled Button disabled state (default is false)
  • style Button style (default, blank)
  • iconName SVG icon name
  • iconFill Class names for svg icon fills (see: @resonate/theme-skins)
  • iconSize SVG icon size (xs, sm, md, lg)
  • text Button text

License

MIT

Author(s)

Readme

Keywords

Package Sidebar

Install

npm i @resonate/button

Weekly Downloads

0

Version

2.1.0

License

MIT

Unpacked Size

26.3 kB

Total Files

11

Last publish

Collaborators

  • resonatecoop