Bladeren bron

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

j8
Bettenbuk Zoltan 6 jaren geleden
bovenliggende
commit
2cbe7922f6

+ 6
- 10
react/features/recording/components/LiveStream/StopLiveStreamDialog.native.js Bestand weergeven

1
 // @flow
1
 // @flow
2
 
2
 
3
 import React from 'react';
3
 import React from 'react';
4
-import { Text, View } from 'react-native';
5
 import { connect } from 'react-redux';
4
 import { connect } from 'react-redux';
6
 
5
 
6
+import { DialogContent } from '../../../base/dialog';
7
 import { translate } from '../../../base/i18n';
7
 import { translate } from '../../../base/i18n';
8
 
8
 
9
-import styles from '../styles';
10
-
11
 import AbstractStopLiveStreamDialog, {
9
 import AbstractStopLiveStreamDialog, {
12
     _mapStateToProps
10
     _mapStateToProps
13
 } from './AbstractStopLiveStreamDialog';
11
 } from './AbstractStopLiveStreamDialog';
27
      */
25
      */
28
     _renderDialogContent() {
26
     _renderDialogContent() {
29
         return (
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 Bestand weergeven

1
 // @flow
1
 // @flow
2
 
2
 
3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
-import { Text, View } from 'react-native';
5
 
4
 
5
+import { DialogContent } from '../../../base/dialog';
6
 import { translate } from '../../../base/i18n';
6
 import { translate } from '../../../base/i18n';
7
 
7
 
8
-import styles from '../styles';
9
-
10
 type Props = {
8
 type Props = {
11
 
9
 
12
     /**
10
     /**
30
         const { t } = this.props;
28
         const { t } = this.props;
31
 
29
 
32
         return (
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 Bestand weergeven

1
 // @flow
1
 // @flow
2
 
2
 
3
 import React from 'react';
3
 import React from 'react';
4
-import { Text, View } from 'react-native';
5
 import { connect } from 'react-redux';
4
 import { connect } from 'react-redux';
6
 
5
 
6
+import { DialogContent } from '../../../base/dialog';
7
 import { translate } from '../../../base/i18n';
7
 import { translate } from '../../../base/i18n';
8
 
8
 
9
-import styles from '../styles';
10
-
11
 import AbstractStopRecordingDialog, {
9
 import AbstractStopRecordingDialog, {
12
     type Props,
10
     type Props,
13
     _mapStateToProps
11
     _mapStateToProps
30
         const { t } = this.props;
28
         const { t } = this.props;
31
 
29
 
32
         return (
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 Bestand weergeven

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

Laden…
Annuleren
Opslaan