Last active
November 5, 2018 18:54
-
-
Save fabiodan/2d4c0e1eae44d9d70a495f565f508051 to your computer and use it in GitHub Desktop.
App
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
App | |
Click Logo -> menuIndex null | |
Menu | |
clickMenuIndex 0 -> menuIndex 0 | |
clickMenuIndex 1 -> menuIndex 1 | |
clickMenuIndex 2 -> menuIndex 2 | |
Inactive Menu | |
menuIndex null* | |
Active Menu& | |
Menu Options | |
menuIndex 0 | |
menuIndex 1 | |
menuIndex 2 | |
Sections | |
Active Sections | |
onEscape -> levelIndex null | |
levelIndex 0 | |
clickLevel 0 -> levelIndex 1 | |
levelIndex 1 | |
clickLevel 0 -> levelIndex 1 | |
clickLevel 1 -> levelIndex 2 | |
levelIndex 2 | |
clickLevel 0 -> levelIndex 1 | |
clickLevel 1 -> levelIndex 2 | |
clickLevel 2 -> levelIndex 3 | |
levelIndex 3 | |
clickLevel 0 -> levelIndex 1 | |
clickLevel 1 -> levelIndex 2 | |
clickLevel 2 -> levelIndex 3 | |
clickLevel 3 -> levelIndex null | |
Inactive Sections | |
levelIndex null |
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 menu() { | |
const liStyle = { | |
fontFamily: '"Roboto", sans-serif', | |
height: '44px', | |
background: 'blue', | |
color: 'white', | |
display: 'inline-flex', | |
alignItems: 'center', | |
padding: '0 16px', | |
cursor: 'pointer', | |
} | |
return ( | |
<ul> | |
<li style={ liStyle }>Groceries</li> | |
<li style={ liStyle }>Favourites</li> | |
<li style={ liStyle }>Account</li> | |
</ul> | |
) | |
} | |
function render(model){ | |
const states = model.active_states.map((state) => state.name) | |
return menu() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment