瀏覽代碼

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

j8
Bettenbuk Zoltan 6 年之前
父節點
當前提交
2cbe7922f6

+ 6
- 10
react/features/recording/components/LiveStream/StopLiveStreamDialog.native.js 查看文件

@@ -1,13 +1,11 @@
1 1
 // @flow
2 2
 
3 3
 import React from 'react';
4
-import { Text, View } from 'react-native';
5 4
 import { connect } from 'react-redux';
6 5
 
6
+import { DialogContent } from '../../../base/dialog';
7 7
 import { translate } from '../../../base/i18n';
8 8
 
9
-import styles from '../styles';
10
-
11 9
 import AbstractStopLiveStreamDialog, {
12 10
     _mapStateToProps
13 11
 } from './AbstractStopLiveStreamDialog';
@@ -27,13 +25,11 @@ class StopLiveStreamDialog extends AbstractStopLiveStreamDialog {
27 25
      */
28 26
     _renderDialogContent() {
29 27
         return (
30
-            <View style = { styles.messageContainer }>
31
-                <Text>
32
-                    {
33
-                        this.props.t('dialog.stopStreamingWarning')
34
-                    }
35
-                </Text>
36
-            </View>
28
+            <DialogContent>
29
+                {
30
+                    this.props.t('dialog.stopStreamingWarning')
31
+                }
32
+            </DialogContent>
37 33
         );
38 34
     }
39 35
 }

+ 4
- 8
react/features/recording/components/Recording/StartRecordingDialogContent.native.js 查看文件

@@ -1,12 +1,10 @@
1 1
 // @flow
2 2
 
3 3
 import React, { Component } from 'react';
4
-import { Text, View } from 'react-native';
5 4
 
5
+import { DialogContent } from '../../../base/dialog';
6 6
 import { translate } from '../../../base/i18n';
7 7
 
8
-import styles from '../styles';
9
-
10 8
 type Props = {
11 9
 
12 10
     /**
@@ -30,11 +28,9 @@ class StartRecordingDialogContent extends Component<Props> {
30 28
         const { t } = this.props;
31 29
 
32 30
         return (
33
-            <View style = { styles.messageContainer }>
34
-                <Text>
35
-                    { t('recording.startRecordingBody') }
36
-                </Text>
37
-            </View>
31
+            <DialogContent>
32
+                { t('recording.startRecordingBody') }
33
+            </DialogContent>
38 34
         );
39 35
     }
40 36
 }

+ 4
- 8
react/features/recording/components/Recording/StopRecordingDialog.native.js 查看文件

@@ -1,13 +1,11 @@
1 1
 // @flow
2 2
 
3 3
 import React from 'react';
4
-import { Text, View } from 'react-native';
5 4
 import { connect } from 'react-redux';
6 5
 
6
+import { DialogContent } from '../../../base/dialog';
7 7
 import { translate } from '../../../base/i18n';
8 8
 
9
-import styles from '../styles';
10
-
11 9
 import AbstractStopRecordingDialog, {
12 10
     type Props,
13 11
     _mapStateToProps
@@ -30,11 +28,9 @@ class StopRecordingDialog extends AbstractStopRecordingDialog<Props> {
30 28
         const { t } = this.props;
31 29
 
32 30
         return (
33
-            <View style = { styles.messageContainer }>
34
-                <Text>
35
-                    { t('dialog.stopRecordingWarning') }
36
-                </Text>
37
-            </View>
31
+            <DialogContent>
32
+                { t('dialog.stopRecordingWarning') }
33
+            </DialogContent>
38 34
         );
39 35
     }
40 36
 }

+ 1
- 6
react/features/recording/components/styles.js 查看文件

@@ -1,6 +1,6 @@
1 1
 // @flow
2 2
 
3
-import { BoxModel, ColorPalette, createStyleSheet } from '../../base/styles';
3
+import { ColorPalette, createStyleSheet } from '../../base/styles';
4 4
 
5 5
 /**
6 6
  * The styles of the React {@code Components} of the feature recording.
@@ -19,10 +19,5 @@ export default createStyleSheet({
19 19
      */
20 20
     indicatorRecording: {
21 21
         backgroundColor: ColorPalette.red
22
-    },
23
-
24
-    messageContainer: {
25
-        paddingHorizontal: BoxModel.padding,
26
-        paddingVertical: 1.5 * BoxModel.padding
27 22
     }
28 23
 });

Loading…
取消
儲存