Skip to content

Latest commit

 

History

History

switch

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

$mol_switch

Buttons which switching the state

Usage example

<= Color $mol_switch
	value? <=> color? \red
	options <= colors *
		red \Red
		green \Green
		blue \Blue

Properties

value( next? ) : string

Property which should be changed value() by buttons based on their own property options.

options() : { [ key : string ] : any }

Keys are possible values of value property. That options are labels which would be visible to user.

enabled() : boolean

Whether the switch is interactive.