2.1.0 • Published 4 years ago
@resonate/button v2.1.0
@resonate/button
Render an HTML button element
Install
$ npm i --save @resonate/buttonUsage
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
prefixA single class or classlistonClickButton onclick event handlervalueButton valuetypeButton type (default is 'button')disabledButton disabled state (default is false)styleButton style (default, blank)iconNameSVG icon nameiconFillClass names for svg icon fills (see: @resonate/theme-skins)iconSizeSVG icon size (xs, sm, md, lg)textButton text
License
MIT
Author(s)
- Augustin Godiscal auggod@resonate.is