Created
August 13, 2019 11:36
-
-
Save Yassir4/363a0a1b083bcfe65ff3ebda75b5ba3c to your computer and use it in GitHub Desktop.
export navigation functions Navigation/index.js
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
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