<s> """<STR_LIT>""" <EOL> from ... import react <EOL> from ... pyscript import window <EOL> from . import Widget <EOL> class Button ( Widget ) : <EOL> """<STR_LIT>""" <EOL> CSS = """<STR_LIT:U+0020>""" <EOL> @ react . input <EOL> def text ( v = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> if not isinstance ( v , str ) : <EOL> raise ValueError ( '<STR_LIT>' ) <EOL> return v <EOL> class JS : <EOL> def _create_node ( self ) : <EOL> self . p = window . phosphor . createWidget ( '<STR_LIT>' ) <EOL> node = self . p . node <EOL> node . addEventListener ( '<STR_LIT>' , lambda ev : self . mouse_down . _set ( <NUM_LIT:1> ) , <NUM_LIT:0> ) <EOL> node . addEventListener ( '<STR_LIT>' , lambda ev : self . mouse_down . _set ( <NUM_LIT:0> ) , <NUM_LIT:0> ) <EOL> @ react . connect ( '<STR_LIT:text>' ) <EOL> def _text_changed ( self , text ) : <EOL> self . node . innerHTML = text <EOL> @ react . source <EOL> def mouse_down ( v = False ) : <EOL> """<STR_LIT>""" <EOL> return bool ( v ) </s>
