wuibutton
v0.3.1
Published
Generic button WizUI component
Downloads
8
Keywords
Readme
What it is
WuiButton is a simple button component made for WizUI. This component inherits from WuiDom and utilizes WizUI's wuiButtonBehavior to setup events to listen on.
It already set CSS class on some event, so only styling is necessary.
Its main CSS class name is 'WuiButton'
and already set the pointer style for mouse over effect.
Method
The constructor receive 2 parameters:
| Parameter | Type | Description
| --------- | ---------- | -----------
| options
| Object | Which is forwarded to the WUiDom class for extra settings.
| action
| Function | The function to execute for a successful tap.
How to use WuiButton
WuiButton is essentially made so all you have to do is some styling around it. And all is needed more more customisation is to inherit from it.
When the button is actually being pressed, the 'pressed' CSS class is added.
CSS Class
pressed
Active when the button is actually pressed.
Set between tapstart
and tapend
disabled
State when the button is disabled. Which means the button cannot be tapped.
Set when the method disable
is called.
Unset when the method enable
is called.