Skip to content

Instantly share code, notes, and snippets.

@Yassir4
Created August 26, 2019 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yassir4/25790ce06ab7f2a5e2bc646a24b9d289 to your computer and use it in GitHub Desktop.
Save Yassir4/25790ce06ab7f2a5e2bc646a24b9d289 to your computer and use it in GitHub Desktop.
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