Last active
May 9, 2019 07:29
-
-
Save ericpringels/23ce48b849aecd4a383cdf167ab23dfc to your computer and use it in GitHub Desktop.
Android screen&
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Android screen& | |
Usecases | |
Login* | |
Register clicked -> Register | |
Register | |
Login clicked -> Login | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function render({active_states}){ | |
var active_state = active_states[0].name; | |
return $('div', {style: { display: 'flex', justifyContent: 'center', height: '100%'}}, | |
render_usescases(active_state))} | |
function render_usescases(active_state){ | |
if (active_state == 'Login') { | |
return $('div', | |
$('button', {style: {border: 'none', padding: '8px 12px', color: 'black',backgroundColor: 'transparent', fontFamily: 'Roboto'}}, 'Login'), | |
$('button', {disabled: true, style: {border: 'none', marginLeft: '6px',padding: '8px 12px', fontFamily: 'Roboto',backgroundColor: 'transparent'}}, 'Register')) | |
} | |
if (active_state == 'Register') { | |
return $('div', | |
$('button', {disabled: true, style: {border: 'none', padding: '8px 12px', backgroundColor: 'transparent', fontFamily: 'Roboto'}}, 'Login'), | |
$('button', {style: {border: 'none', padding: '8px 12px', marginLeft: '6px',color: 'black',backgroundColor: 'transparent', fontFamily: 'Roboto'}}, 'Register')) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment