Selaa lähdekoodia

feat(navigation) style updates

master
Calin Chitu 3 vuotta sitten
vanhempi
commit
a272995b8c

+ 12
- 4
react/features/mobile/navigation/components/HeaderNavigationButton.js Näytä tiedosto

@@ -4,11 +4,16 @@ import React from 'react';
4 4
 import { Text, TouchableRipple } from 'react-native-paper';
5 5
 
6 6
 import { Icon } from '../../../base/icons';
7
-import BaseTheme from '../../../base/ui/components/BaseTheme';
7
+import type { StyleType } from '../../../base/styles';
8 8
 import styles from '../../../conference/components/native/styles';
9 9
 
10 10
 type Props = {
11 11
 
12
+    /**
13
+     * Style of the header button .
14
+     */
15
+    buttonStyle?: StyleType,
16
+
12 17
     /**
13 18
      * Is the button disabled?
14 19
      */
@@ -37,6 +42,7 @@ type Props = {
37 42
 
38 43
 const HeaderNavigationButton
39 44
     = ({
45
+        buttonStyle,
40 46
         disabled,
41 47
         label,
42 48
         onPress,
@@ -49,8 +55,10 @@ const HeaderNavigationButton
49 55
                     src ? (
50 56
                         <TouchableRipple
51 57
                             onPress = { onPress }
52
-                            rippleColor = { BaseTheme.palette.screen02Header }
53
-                            style = { styles.headerNavigationButton } >
58
+                            rippleColor = { 'transparent' }
59
+                            style = { [
60
+                                buttonStyle,
61
+                                styles.headerNavigationButton ] } >
54 62
                             <Icon
55 63
                                 size = { 24 }
56 64
                                 src = { src } />
@@ -59,7 +67,7 @@ const HeaderNavigationButton
59 67
                         <TouchableRipple
60 68
                             disabled = { disabled }
61 69
                             onPress = { onPress }
62
-                            rippleColor = { BaseTheme.palette.screen02Header }>
70
+                            rippleColor = { 'transparent' }>
63 71
                             <Text
64 72
                                 style = {
65 73
                                     twoActions

+ 5
- 0
react/features/mobile/navigation/components/styles.js Näytä tiedosto

@@ -8,6 +8,11 @@ export const TEXT_COLOR = BaseTheme.palette.text01;
8 8
  * Styles of the navigation feature.
9 9
  */
10 10
 export const navigationStyles = {
11
+
12
+    arrowBackStyle: {
13
+        marginLeft: 14
14
+    },
15
+
11 16
     connectingScreenContainer: {
12 17
         backgroundColor: BaseTheme.palette.uiBackground,
13 18
         flex: 1

+ 2
- 0
react/features/mobile/navigation/components/welcome/functions.js Näytä tiedosto

@@ -6,6 +6,7 @@ import { getFeatureFlag, WELCOME_PAGE_ENABLED } from '../../../../base/flags';
6 6
 import { IconArrowBack } from '../../../../base/icons';
7 7
 import HeaderNavigationButton
8 8
     from '../HeaderNavigationButton';
9
+import { navigationStyles } from '../styles';
9 10
 
10 11
 /**
11 12
  * Determines whether the {@code WelcomePage} is enabled by the app itself
@@ -31,6 +32,7 @@ export function isWelcomePageAppEnabled(stateful: Function | Object) {
31 32
 export function renderArrowBackButton(onPress: Function) {
32 33
     return (
33 34
         <HeaderNavigationButton
35
+            buttonStyle = { navigationStyles.arrowBackStyle }
34 36
             onPress = { onPress }
35 37
             src = { IconArrowBack } />
36 38
     );

+ 1
- 1
react/features/welcome/components/native/HelpView.js Näytä tiedosto

@@ -45,7 +45,7 @@ class HelpView extends PureComponent<Props> {
45 45
         navigation.setOptions({
46 46
             headerLeft: () =>
47 47
                 renderArrowBackButton(() =>
48
-                    navigation.jumpTo(screen.welcome.main))
48
+                    navigation.navigate(screen.welcome.main))
49 49
         });
50 50
     }
51 51
 

+ 1
- 1
react/features/welcome/components/native/PrivacyView.js Näytä tiedosto

@@ -29,7 +29,7 @@ const PrivacyView = ({ navigation }: Props) => {
29 29
         navigation.setOptions({
30 30
             headerLeft: () =>
31 31
                 renderArrowBackButton(() =>
32
-                    navigation.jumpTo(screen.welcome.main))
32
+                    navigation.navigate(screen.welcome.main))
33 33
         });
34 34
     });
35 35
 

+ 1
- 1
react/features/welcome/components/native/TermsView.js Näytä tiedosto

@@ -29,7 +29,7 @@ const TermsView = ({ navigation }: Props) => {
29 29
         navigation.setOptions({
30 30
             headerLeft: () =>
31 31
                 renderArrowBackButton(() =>
32
-                    navigation.jumpTo(screen.welcome.main))
32
+                    navigation.navigate(screen.welcome.main))
33 33
         });
34 34
     });
35 35
 

+ 1
- 1
react/features/welcome/components/native/settings/components/SettingsView.js Näytä tiedosto

@@ -165,7 +165,7 @@ class SettingsView extends AbstractSettingsView<Props, State> {
165 165
         navigation.setOptions({
166 166
             headerLeft: () =>
167 167
                 renderArrowBackButton(() =>
168
-                    navigation.jumpTo(screen.welcome.main))
168
+                    navigation.navigate(screen.welcome.main))
169 169
         });
170 170
     }
171 171
 

Loading…
Peruuta
Tallenna