NssButton
This component provide a simple button component with callback functionality and styles.
How to use
ES6 module import
For NssUiApi
usage, please see the README.md of the nss_libs/ui
folder.
Alternative example of direct ES6 module import:
Simple button
NssButton
methods
NssButton
methodsGlowing
enableGlowing()
disableGlowing()
setGlowGreen()
setGlowDanger()
setGlowGold()
Colors
setGold()
setDanger()
setSuccess()
setWhite()
setGrey()
Sizes
setSizeVerySmall()
setSizeSmall()
setSizeNormal()
setSizeLarge()
Other
setDisabled()
setEnabled()
setBorderless()
Removes inner button padding.unsetBorderless()
setIcon()
Change styles of button to support icon.unsetIcon()
setLabel(new_label)
Change label of button. Supports HTML.getEl()
Returns the button element.getWrapperEl()
Returns the button wrapper element. Use this to add as child of other elements.onClick(callback)
Register a callback function which is called when the button is clicked.appendTo(target_el)
Append the button to the end of the element. (New since version 0.31.0)
Last updated