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.
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. |
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.
Active when the button is actually pressed.
Set between tapstart
and tapend
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.