0.3.1 • Published 9 years ago

wuibutton v0.3.1

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

#WuiButton Circle CI

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:

ParameterTypeDescription
optionsObjectWhich is forwarded to the WUiDom class for extra settings.
actionFunctionThe 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.