[RN] Improve video switch style and remove react warning

This commit is contained in:
Bettenbuk Zoltan 2018-05-15 12:34:05 +02:00 committed by Saúl Ibarra Corretgé
parent f64b511682
commit df7b8e51fc
2 changed files with 18 additions and 6 deletions

View File

@ -62,9 +62,11 @@ class VideoSwitch extends Component<Props> {
<View style = { styles.audioVideoSwitchContainer }>
<TouchableWithoutFeedback
onPress = { this._onStartAudioOnlyFalse }>
<Text style = { textStyle }>
{ t('welcomepage.audioVideoSwitch.video') }
</Text>
<View style = { styles.switchLabel }>
<Text style = { textStyle }>
{ t('welcomepage.audioVideoSwitch.video') }
</Text>
</View>
</TouchableWithoutFeedback>
<Switch
onTintColor = { SWITCH_UNDER_COLOR }
@ -74,9 +76,11 @@ class VideoSwitch extends Component<Props> {
value = { _settings.startAudioOnly } />
<TouchableWithoutFeedback
onPress = { this._onStartAudioOnlyTrue }>
<Text style = { textStyle }>
{ t('welcomepage.audioVideoSwitch.audio') }
</Text>
<View style = { styles.switchLabel }>
<Text style = { textStyle }>
{ t('welcomepage.audioVideoSwitch.audio') }
</Text>
</View>
</TouchableWithoutFeedback>
</View>
);

View File

@ -34,6 +34,7 @@ export default createStyleSheet({
* View that contains the audio-video switch and the labels.
*/
audioVideoSwitchContainer: {
alignItems: 'center',
flexDirection: 'row'
},
@ -222,6 +223,13 @@ export default createStyleSheet({
fontWeight: 'bold'
},
/**
* The container of the label of the audio-video switch.
*/
switchLabel: {
paddingHorizontal: 3
},
/**
* Room input style.
*/