mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
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:
committed by
Facebook Github Bot
parent
694bf7104c
commit
ecdb239eaa
@@ -278,9 +278,9 @@ const styles = StyleSheet.create({
|
||||
position: 'absolute',
|
||||
},
|
||||
container: {
|
||||
position: 'absolute',
|
||||
[side]: 0,
|
||||
top: 0,
|
||||
flex: 1,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user