diff --git a/app/react-native/src/preview/components/OnDeviceUI/index.js b/app/react-native/src/preview/components/OnDeviceUI/index.js index 6cb01a67c0f..b349854a1f4 100644 --- a/app/react-native/src/preview/components/OnDeviceUI/index.js +++ b/app/react-native/src/preview/components/OnDeviceUI/index.js @@ -7,6 +7,7 @@ import { View, TouchableWithoutFeedback, Image, + Platform, Text, StatusBar, } from 'react-native'; @@ -72,6 +73,8 @@ export default class OnDeviceUI extends Component { const { stories, events, url } = this.props; const { menuAnimation, selectedKind, selectedStory, menuWidth } = this.state; + const StatusBarHeight = Platform.OS === 'ios' ? 30 : 0; + const menuStyles = [ style.menuContainer, { @@ -83,6 +86,7 @@ export default class OnDeviceUI extends Component { }), }, ], + marginTop: StatusBarHeight, }, ]; @@ -92,6 +96,7 @@ export default class OnDeviceUI extends Component { inputRange: [0, 1], outputRange: [0, menuWidth], }), + marginTop: StatusBarHeight, }, ]; @@ -105,6 +110,13 @@ export default class OnDeviceUI extends Component { }, ]; + const previewContainerStyles = [ + style.previewContainer, + { + marginTop: StatusBarHeight, + }, + ]; + /* Checks if import is a base64 encoded string uri. If using haul as bundler, some projects are set up to include small files as base64 strings. @@ -120,9 +132,9 @@ export default class OnDeviceUI extends Component { return ( -