fix: fix issue that Modal children cannot grow (#491)

Add `flex:1` to Modal to fix the issue that `Modal` children cannot grow. fixes #471
This commit is contained in:
fzyzcjy
2018-08-16 18:19:43 +08:00
committed by Satyajit Sahoo
parent 53960896cc
commit 7b0cd50dac

View File

@@ -154,7 +154,7 @@ class Modal extends React.Component<Props, State> {
<View style={StyleSheet.absoluteFill} />
</TouchableWithoutFeedback>
)}
<Animated.View style={[{ opacity: this.state.opacity }]}>
<Animated.View style={[{ opacity: this.state.opacity }, styles.childrenWrapper]}>
{children}
</Animated.View>
</Animated.View>
@@ -171,4 +171,7 @@ const styles = StyleSheet.create({
...StyleSheet.absoluteFillObject,
justifyContent: 'center',
},
childrenWrapper: {
flex: 1
}
});