Selaa lähdekoodia

[RN] Improve video switch style and remove react warning

j8
Bettenbuk Zoltan 7 vuotta sitten
vanhempi
commit
df7b8e51fc

+ 10
- 6
react/features/welcome/components/VideoSwitch.js Näytä tiedosto

@@ -62,9 +62,11 @@ class VideoSwitch extends Component<Props> {
62 62
             <View style = { styles.audioVideoSwitchContainer }>
63 63
                 <TouchableWithoutFeedback
64 64
                     onPress = { this._onStartAudioOnlyFalse }>
65
-                    <Text style = { textStyle }>
66
-                        { t('welcomepage.audioVideoSwitch.video') }
67
-                    </Text>
65
+                    <View style = { styles.switchLabel }>
66
+                        <Text style = { textStyle }>
67
+                            { t('welcomepage.audioVideoSwitch.video') }
68
+                        </Text>
69
+                    </View>
68 70
                 </TouchableWithoutFeedback>
69 71
                 <Switch
70 72
                     onTintColor = { SWITCH_UNDER_COLOR }
@@ -74,9 +76,11 @@ class VideoSwitch extends Component<Props> {
74 76
                     value = { _settings.startAudioOnly } />
75 77
                 <TouchableWithoutFeedback
76 78
                     onPress = { this._onStartAudioOnlyTrue }>
77
-                    <Text style = { textStyle }>
78
-                        { t('welcomepage.audioVideoSwitch.audio') }
79
-                    </Text>
79
+                    <View style = { styles.switchLabel }>
80
+                        <Text style = { textStyle }>
81
+                            { t('welcomepage.audioVideoSwitch.audio') }
82
+                        </Text>
83
+                    </View>
80 84
                 </TouchableWithoutFeedback>
81 85
             </View>
82 86
         );

+ 8
- 0
react/features/welcome/components/styles.js Näytä tiedosto

@@ -34,6 +34,7 @@ export default createStyleSheet({
34 34
      * View that contains the audio-video switch and the labels.
35 35
      */
36 36
     audioVideoSwitchContainer: {
37
+        alignItems: 'center',
37 38
         flexDirection: 'row'
38 39
     },
39 40
 
@@ -222,6 +223,13 @@ export default createStyleSheet({
222 223
         fontWeight: 'bold'
223 224
     },
224 225
 
226
+    /**
227
+     * The container of the label of the audio-video switch.
228
+     */
229
+    switchLabel: {
230
+        paddingHorizontal: 3
231
+    },
232
+
225 233
     /**
226 234
      * Room input style.
227 235
      */

Loading…
Peruuta
Tallenna