Created
August 26, 2019 22:09
-
-
Save Yassir4/25790ce06ab7f2a5e2bc646a24b9d289 to your computer and use it in GitHub Desktop.
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