You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ConferenceNavigatorScreenOptions.js 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. import { TransitionPresets } from '@react-navigation/stack';
  2. import React from 'react';
  3. import { Platform } from 'react-native';
  4. import { IconClose } from '../../../base/icons';
  5. import BaseTheme from '../../../base/ui/components/BaseTheme';
  6. import { goBack } from './ConferenceNavigationContainerRef';
  7. import HeaderNavigationButton from './HeaderNavigationButton';
  8. /**
  9. * Default modal transition for the current platform.
  10. */
  11. export const conferenceModalPresentation = Platform.select({
  12. ios: TransitionPresets.ModalPresentationIOS,
  13. default: TransitionPresets.DefaultTransition
  14. });
  15. /**
  16. * Screen options and transition types.
  17. */
  18. export const screenOptions = {
  19. ...TransitionPresets.ModalTransition,
  20. gestureEnabled: false,
  21. headerShown: false
  22. };
  23. /**
  24. * Screen options for conference.
  25. */
  26. export const conferenceScreenOptions = {
  27. ...screenOptions
  28. };
  29. /**
  30. * Screen options for lobby modal.
  31. */
  32. export const lobbyScreenOptions = {
  33. ...screenOptions
  34. };
  35. /**
  36. * Tab bar options for chat screen.
  37. */
  38. export const chatTabBarOptions = {
  39. activeTintColor: BaseTheme.palette.screen01Header,
  40. labelStyle: {
  41. fontSize: BaseTheme.typography.labelRegular.fontSize
  42. },
  43. inactiveTintColor: BaseTheme.palette.field02Disabled,
  44. indicatorStyle: {
  45. backgroundColor: BaseTheme.palette.screen01Header
  46. }
  47. };
  48. /**
  49. * Screen options for presentation type modals.
  50. */
  51. export const presentationScreenOptions = {
  52. ...conferenceModalPresentation,
  53. headerBackTitleVisible: false,
  54. headerLeft: () => (
  55. <HeaderNavigationButton
  56. onPress = { goBack }
  57. src = { IconClose } />
  58. ),
  59. headerStatusBarHeight: 0,
  60. headerStyle: {
  61. backgroundColor: BaseTheme.palette.screen01Header
  62. },
  63. headerTitleStyle: {
  64. color: BaseTheme.palette.text01
  65. }
  66. };
  67. /**
  68. * Screen options for chat.
  69. */
  70. export const chatScreenOptions = {
  71. ...presentationScreenOptions
  72. };
  73. /**
  74. * Screen options for invite modal.
  75. */
  76. export const inviteScreenOptions = {
  77. ...presentationScreenOptions
  78. };
  79. /**
  80. * Screen options for participants modal.
  81. */
  82. export const participantsScreenOptions = {
  83. ...presentationScreenOptions
  84. };
  85. /**
  86. * Screen options for shared document.
  87. */
  88. export const sharedDocumentScreenOptions = {
  89. ...TransitionPresets.DefaultTransition,
  90. headerBackTitleVisible: false,
  91. headerShown: true,
  92. headerStyle: {
  93. backgroundColor: BaseTheme.palette.screen01Header
  94. },
  95. headerTitleStyle: {
  96. color: BaseTheme.palette.text01
  97. }
  98. };