浏览代码

[RN] Improve video switch style and remove react warning

j8
Bettenbuk Zoltan 7 年前
父节点
当前提交
df7b8e51fc
共有 2 个文件被更改,包括 18 次插入6 次删除
  1. 10
    6
      react/features/welcome/components/VideoSwitch.js
  2. 8
    0
      react/features/welcome/components/styles.js

+ 10
- 6
react/features/welcome/components/VideoSwitch.js 查看文件

62
             <View style = { styles.audioVideoSwitchContainer }>
62
             <View style = { styles.audioVideoSwitchContainer }>
63
                 <TouchableWithoutFeedback
63
                 <TouchableWithoutFeedback
64
                     onPress = { this._onStartAudioOnlyFalse }>
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
                 </TouchableWithoutFeedback>
70
                 </TouchableWithoutFeedback>
69
                 <Switch
71
                 <Switch
70
                     onTintColor = { SWITCH_UNDER_COLOR }
72
                     onTintColor = { SWITCH_UNDER_COLOR }
74
                     value = { _settings.startAudioOnly } />
76
                     value = { _settings.startAudioOnly } />
75
                 <TouchableWithoutFeedback
77
                 <TouchableWithoutFeedback
76
                     onPress = { this._onStartAudioOnlyTrue }>
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
                 </TouchableWithoutFeedback>
84
                 </TouchableWithoutFeedback>
81
             </View>
85
             </View>
82
         );
86
         );

+ 8
- 0
react/features/welcome/components/styles.js 查看文件

34
      * View that contains the audio-video switch and the labels.
34
      * View that contains the audio-video switch and the labels.
35
      */
35
      */
36
     audioVideoSwitchContainer: {
36
     audioVideoSwitchContainer: {
37
+        alignItems: 'center',
37
         flexDirection: 'row'
38
         flexDirection: 'row'
38
     },
39
     },
39
 
40
 
222
         fontWeight: 'bold'
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
      * Room input style.
234
      * Room input style.
227
      */
235
      */

正在加载...
取消
保存