Update styles of Modal container as a pre-requisite to implement Modal on Fabric

Summary:
This diff changes the style of the Modal container style as a pre-requisite to implement Modal on Fabric.
In the current version of React Native the size of the View container is determined at runtime using the size of the screen. The size of this view is set overriding the Widht and Height of this Container View (using the screen size), in Fabric we can not update the size of that view, instead we set the size of the RCTModalHostView to take the size of the whole screen.
Since the RCTModalHostView has an absolute position and it has the size of the screen, making this change should be enough to keep backward compatibility and be able to implement Modal on Fabric

Reviewed By: JoshuaGross

Differential Revision: D15067616

fbshipit-source-id: d7302ef3afc503adfee10e12fb6d0ebd371fb7ed
This commit is contained in:
David Vacca
2019-04-30 15:01:37 -07:00
committed by Facebook Github Bot
parent 694bf7104c
commit ecdb239eaa
2 changed files with 2 additions and 2 deletions

View File

@@ -278,9 +278,9 @@ const styles = StyleSheet.create({
position: 'absolute',
},
container: {
position: 'absolute',
[side]: 0,
top: 0,
flex: 1,
},
});

View File

@@ -26,8 +26,8 @@ exports[`<Modal /> should render as <RCTModalHostView> when not mocked 1`] = `
style={
Array [
Object {
"flex": 1,
"left": 0,
"position": "absolute",
"top": 0,
},
Object {