diff --git a/react/features/base/dialog/components/styles.js b/react/features/base/dialog/components/styles.js index 73b9772f8..d31e9fe4a 100644 --- a/react/features/base/dialog/components/styles.js +++ b/react/features/base/dialog/components/styles.js @@ -1,3 +1,5 @@ +import { StyleSheet } from 'react-native'; + import { ColorPalette, createStyleSheet } from '../../styles'; /** @@ -32,11 +34,7 @@ export const bottomSheetStyles = createStyleSheet({ * view instead, so the modal animation doesn't affect the backdrop. */ backdrop: { - bottom: 0, - left: 0, - position: 'absolute', - right: 0, - top: 0 + ...StyleSheet.absoluteFillObject }, /** @@ -53,12 +51,8 @@ export const bottomSheetStyles = createStyleSheet({ * Style for an overlay on top of which the sheet will be displayed. */ overlay: { - backgroundColor: 'rgba(0, 0, 0, 0.8)', - bottom: 0, - left: 0, - position: 'absolute', - right: 0, - top: 0 + ...StyleSheet.absoluteFillObject, + backgroundColor: 'rgba(0, 0, 0, 0.8)' }, /** diff --git a/react/features/base/jwt/components/styles.native.js b/react/features/base/jwt/components/styles.native.js index faa84414b..6c18760ed 100644 --- a/react/features/base/jwt/components/styles.native.js +++ b/react/features/base/jwt/components/styles.native.js @@ -1,3 +1,5 @@ +import { StyleSheet } from 'react-native'; + import { ColorPalette, createStyleSheet } from '../../styles'; export default createStyleSheet({ @@ -8,17 +10,13 @@ export default createStyleSheet({ * The style of {@code CalleeInfo}. */ ringing: { + ...StyleSheet.absoluteFillObject, alignItems: 'center', backgroundColor: ColorPalette.black, - bottom: 0, flex: 0, flexDirection: 'column', justifyContent: 'center', - left: 0, - opacity: 0.8, - position: 'absolute', - right: 0, - top: 0 + opacity: 0.8 }, 'ringing__avatar': { diff --git a/react/features/base/media/components/native/styles.js b/react/features/base/media/components/native/styles.js index fcf6fc83b..34053e151 100644 --- a/react/features/base/media/components/native/styles.js +++ b/react/features/base/media/components/native/styles.js @@ -35,11 +35,7 @@ export default StyleSheet.create({ * and create a fade-in effect. */ videoCover: { - backgroundColor: ColorPalette.black, - bottom: 0, - left: 0, - position: 'absolute', - right: 0, - top: 0 + ...StyleSheet.absoluteFillObject, + backgroundColor: ColorPalette.black } }); diff --git a/react/features/base/react/components/native/TintedView.js b/react/features/base/react/components/native/TintedView.js index 5c22d645f..15064c6bc 100644 --- a/react/features/base/react/components/native/TintedView.js +++ b/react/features/base/react/components/native/TintedView.js @@ -1,7 +1,7 @@ // @flow import React, { Component } from 'react'; -import { View } from 'react-native'; +import { StyleSheet, View } from 'react-native'; import { ColorPalette } from '../../../styles'; @@ -9,13 +9,9 @@ import { ColorPalette } from '../../../styles'; * Base style for the {@code TintedView} component. */ const BASE_STYLE = { + ...StyleSheet.absoluteFillObject, alignItems: 'center', - bottom: 0, - justifyContent: 'center', - left: 0, - position: 'absolute', - right: 0, - top: 0 + justifyContent: 'center' }; /** diff --git a/react/features/base/react/components/native/styles.js b/react/features/base/react/components/native/styles.js index d0e109804..ae0d35f49 100644 --- a/react/features/base/react/components/native/styles.js +++ b/react/features/base/react/components/native/styles.js @@ -1,3 +1,5 @@ +import { StyleSheet } from 'react-native'; + import { BoxModel, ColorPalette, @@ -47,15 +49,11 @@ const HEADER_STYLES = { * The top-level element of a page. */ page: { + ...StyleSheet.absoluteFillObject, alignItems: 'stretch', - bottom: 0, flex: 1, flexDirection: 'column', - left: 0, - overflow: 'hidden', - position: 'absolute', - right: 0, - top: 0 + overflow: 'hidden' }, /** diff --git a/react/features/large-video/components/styles.js b/react/features/large-video/components/styles.js index a7da3ce92..422a41307 100644 --- a/react/features/large-video/components/styles.js +++ b/react/features/large-video/components/styles.js @@ -1,3 +1,5 @@ +import { StyleSheet } from 'react-native'; + import { ColorPalette, createStyleSheet } from '../../base/styles'; /** @@ -10,14 +12,10 @@ export default createStyleSheet({ * Large video container style. */ largeVideo: { + ...StyleSheet.absoluteFillObject, alignItems: 'stretch', backgroundColor: ColorPalette.appBackground, - bottom: 0, flex: 1, - justifyContent: 'center', - left: 0, - position: 'absolute', - right: 0, - top: 0 + justifyContent: 'center' } }); diff --git a/react/features/overlay/components/OverlayFrame.native.js b/react/features/overlay/components/OverlayFrame.native.js index 82f7eb02c..1e19dfe05 100644 --- a/react/features/overlay/components/OverlayFrame.native.js +++ b/react/features/overlay/components/OverlayFrame.native.js @@ -1,7 +1,7 @@ // @flow -import React, { Component } from 'react'; -import { View } from 'react-native'; +import React, { Component, type Node } from 'react'; +import { SafeAreaView } from 'react-native'; import { overlayFrame as styles } from './styles'; @@ -13,7 +13,7 @@ type Props = { /** * The children components to be displayed into the overlay frame. */ - children?: React$Node, + children: Node, }; /** @@ -24,13 +24,13 @@ export default class OverlayFrame extends Component { * Implements React's {@link Component#render()}. * * @inheritdoc - * @returns {React$Element} + * @returns {ReactElement} */ render() { return ( - + { this.props.children } - + ); } } diff --git a/react/features/overlay/components/styles.js b/react/features/overlay/components/styles.js index b7c4dcea8..ac16a7d1d 100644 --- a/react/features/overlay/components/styles.js +++ b/react/features/overlay/components/styles.js @@ -1,3 +1,5 @@ +import { StyleSheet } from 'react-native'; + import { BoxModel, ColorPalette, createStyleSheet } from '../../base/styles'; /** @@ -14,12 +16,8 @@ export const overlayFrame = createStyleSheet({ * rendered. */ container: { - backgroundColor: ColorPalette.red, - bottom: 0, - left: 0, - position: 'absolute', - right: 0, - top: 0 + ...StyleSheet.absoluteFillObject, + backgroundColor: ColorPalette.red } }); @@ -52,22 +50,16 @@ export const pageReloadOverlay = createStyleSheet({ */ container: { flex: 1, - marginBottom: BoxModel.margin, - marginHorizontal: BoxModel.margin, - marginTop: BoxModel.margin * 3 + margin: BoxModel.margin * 2 }, /** * Style for the {@code LoadingIndicator}. */ loadingIndicator: { + ...StyleSheet.absoluteFillObject, alignItems: 'center', - bottom: 0, - justifyContent: 'center', - left: 0, - position: 'absolute', - right: 0, - top: 0 + justifyContent: 'center' }, /** diff --git a/react/features/toolbox/components/native/styles.js b/react/features/toolbox/components/native/styles.js index 2cde59b65..9e4b47297 100644 --- a/react/features/toolbox/components/native/styles.js +++ b/react/features/toolbox/components/native/styles.js @@ -1,4 +1,5 @@ // @flow +import { StyleSheet } from 'react-native'; import { BoxModel, ColorPalette, createStyleSheet } from '../../../base/styles'; @@ -98,11 +99,7 @@ const styles = createStyleSheet({ * of the screen. */ toolboxWide: { - bottom: 0, - left: 0, - position: 'absolute', - right: 0, - top: 0 + ...StyleSheet.absoluteFillObject }, /**