[RN] Dialogs: Replace legacy common style with common container

This commit is contained in:
Bettenbuk Zoltan 2018-09-18 16:08:01 +02:00 committed by Saúl Ibarra Corretgé
parent b673c4a11a
commit 2cbe7922f6
4 changed files with 15 additions and 32 deletions

View File

@ -1,13 +1,11 @@
// @flow
import React from 'react';
import { Text, View } from 'react-native';
import { connect } from 'react-redux';
import { DialogContent } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
import styles from '../styles';
import AbstractStopLiveStreamDialog, {
_mapStateToProps
} from './AbstractStopLiveStreamDialog';
@ -27,13 +25,11 @@ class StopLiveStreamDialog extends AbstractStopLiveStreamDialog {
*/
_renderDialogContent() {
return (
<View style = { styles.messageContainer }>
<Text>
<DialogContent>
{
this.props.t('dialog.stopStreamingWarning')
}
</Text>
</View>
</DialogContent>
);
}
}

View File

@ -1,12 +1,10 @@
// @flow
import React, { Component } from 'react';
import { Text, View } from 'react-native';
import { DialogContent } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
import styles from '../styles';
type Props = {
/**
@ -30,11 +28,9 @@ class StartRecordingDialogContent extends Component<Props> {
const { t } = this.props;
return (
<View style = { styles.messageContainer }>
<Text>
<DialogContent>
{ t('recording.startRecordingBody') }
</Text>
</View>
</DialogContent>
);
}
}

View File

@ -1,13 +1,11 @@
// @flow
import React from 'react';
import { Text, View } from 'react-native';
import { connect } from 'react-redux';
import { DialogContent } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
import styles from '../styles';
import AbstractStopRecordingDialog, {
type Props,
_mapStateToProps
@ -30,11 +28,9 @@ class StopRecordingDialog extends AbstractStopRecordingDialog<Props> {
const { t } = this.props;
return (
<View style = { styles.messageContainer }>
<Text>
<DialogContent>
{ t('dialog.stopRecordingWarning') }
</Text>
</View>
</DialogContent>
);
}
}

View File

@ -1,6 +1,6 @@
// @flow
import { BoxModel, ColorPalette, createStyleSheet } from '../../base/styles';
import { ColorPalette, createStyleSheet } from '../../base/styles';
/**
* The styles of the React {@code Components} of the feature recording.
@ -19,10 +19,5 @@ export default createStyleSheet({
*/
indicatorRecording: {
backgroundColor: ColorPalette.red
},
messageContainer: {
paddingHorizontal: BoxModel.padding,
paddingVertical: 1.5 * BoxModel.padding
}
});