export navigation functions Navigation/index.js
export const pushScreen = props => { | |
const { componentId } = props; | |
Navigation.push(componentId, { | |
component: { | |
name: 'PushedScreen', | |
}, | |
}); | |
}; | |
export const openModal = () => { | |
Navigation.showModal({ | |
stack: { | |
children: [ | |
{ | |
component: { | |
name: 'ModalScreen', | |
passProps: { | |
text: 'This is the modal screen', | |
}, | |
options: { | |
topBar: { | |
title: { | |
text: 'Title text', | |
}, | |
leftButtons: [ | |
{ | |
color: '#00bfff', | |
text: 'button', | |
id: 'leftButton', | |
}, | |
], | |
}, | |
}, | |
}, | |
}, | |
], | |
}, | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment