Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. export const pushScreen = props => {
  2. const { componentId } = props;
  3. Navigation.push(componentId, {
  4. component: {
  5. name: 'PushedScreen',
  6. },
  7. });
  8. };
  9.  
  10. export const openModal = () => {
  11. Navigation.showModal({
  12. stack: {
  13. children: [
  14. {
  15. component: {
  16. name: 'ModalScreen',
  17. passProps: {
  18. text: 'This is the modal screen',
  19. },
  20. options: {
  21. topBar: {
  22. title: {
  23. text: 'Title text',
  24. },
  25. leftButtons: [
  26. {
  27. color: '#00bfff',
  28. text: 'button',
  29. id: 'leftButton',
  30. },
  31. ],
  32. },
  33. },
  34. },
  35. },
  36. ],
  37. },
  38. });
  39. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement