mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-24 07:09:03 +00:00
[fix] AppRegistry container layout
Absolute fill positioning provides better default layout for full-screen apps. Fix #528
This commit is contained in:
@@ -40,6 +40,9 @@ Runs the application that was registered under `appKey`. The `appParameters`
|
||||
must include the `rootTag` into which the application is rendered, and
|
||||
optionally any `initialProps`.
|
||||
|
||||
On web, if the `rootTag` is a sub-section of your application it should be
|
||||
styled as `position:relative` and given an explicit height.
|
||||
|
||||
static **unmountApplicationComponentAtRootTag**(rootTag: HTMLElement)
|
||||
|
||||
To "stop" an application when a view should be destroyed, call
|
||||
|
||||
@@ -48,7 +48,7 @@ export default class AppContainer extends Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View pointerEvents="box-none" style={styles.appContainer}>
|
||||
<View pointerEvents="box-none" style={[styles.appContainer, StyleSheet.absoluteFill]}>
|
||||
<View
|
||||
children={this.props.children}
|
||||
key={this.state.mainKey}
|
||||
|
||||
@@ -152,7 +152,7 @@ const createReducer = (style, styleProps) => {
|
||||
resolvedStyle.flexShrink = 0;
|
||||
}
|
||||
if (style.flexBasis == null) {
|
||||
resolvedStyle.flexBasis = 'auto'
|
||||
resolvedStyle.flexBasis = 'auto';
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user