Imba integration with pro-router.js
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
209 B

require './switch.scss'
tag switch
prop key
prop disable
def setup
@r = R
def render
<self.is_on=is_on .disabled=@disable>
def is_on
@r:params[@key]
def ontap
@r.toggle key unless @disable