Skip to content

Instantly share code, notes, and snippets.

@ericpringels
Last active May 9, 2019 07:29
Show Gist options
  • Save ericpringels/23ce48b849aecd4a383cdf167ab23dfc to your computer and use it in GitHub Desktop.
Save ericpringels/23ce48b849aecd4a383cdf167ab23dfc to your computer and use it in GitHub Desktop.
Android screen&
Android screen&
Usecases
Login*
Register clicked -> Register
Register
Login clicked -> Login
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