I can't configure modal height and width using style
property. Is there any other way to set modal height and width?
<Modal style={{height: 300, width: 300}}
visible={this.state.isVisible}
onRequestClose={this.closeModal}>
</Modal>
The code above doesn't work.
Try adding
margin:0
in the style of the<Modal>
ComponentIn the Modal documentation it is not mentioned it but it has a style property.
The following works for me.
According to the Modal documentation, there is no
style
prop to be set.You can try setting the
<View>
dimensions inside the<Modal>
instead:The following worked for me after i have tried other methods