Skip to content

Instantly share code, notes, and snippets.

@bodia-uz
Last active November 20, 2018 19:43
Show Gist options
  • Save bodia-uz/2756b65d1ca7be3b50d52070bbee2387 to your computer and use it in GitHub Desktop.
Save bodia-uz/2756b65d1ca7be3b50d52070bbee2387 to your computer and use it in GitHub Desktop.
Wizard
Wizard
new -> Input
Input
Onboarding*
next -> Import
Media
Import
back -> Onboarding
next -> Upload & Choose
Upload & Choose
back -> Import
next -> Theme
Customize
Theme*
back -> Upload & Choose
next -> Style
Style
back -> Theme
next -> Music
Music
back -> Style
next -> Texts
Texts
back -> Music
next -> Preview
Preview
back -> Texts
next -> Final
Final
function render(model){
let currentState = model.active_states[0].name;
return (
<div>
<h1>{currentState}</h1>
<button onClick={() => model.emit('back')} disabled={currentState === 'Final'}>back</button>
<button onClick={() => model.emit('next')} disabled={currentState === 'Final'}>next</button>
&nbsp;
<button onClick={() => model.emit('new')}>new</button>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment