Skip to content

Instantly share code, notes, and snippets.

@emilwidlund
Last active April 24, 2017 22:03
Show Gist options
  • Select an option

  • Save emilwidlund/7cb40b92f21f0ff62d9a2dfbd4700d6b to your computer and use it in GitHub Desktop.

Select an option

Save emilwidlund/7cb40b92f21f0ff62d9a2dfbd4700d6b to your computer and use it in GitHub Desktop.
This is a simple focusable with an action that makes a transition to another view
new Focusable({
width: 100,
height: 100,
backgroundColor: 'rgba(0, 0, 0, .66)',
animationOptions: {
time: .2,
curve: 'ease-out'
},
focusProperties: {
backgroundColor: '#fff',
animationOptions: {
time: .2,
curve: 'ease-out'
}
},
actions: [
{
keyCode: 2,
label: 'Select',
function: () => {
App.transition(view, Transitions.goIn);
}
}
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment