Set width and height to React-native modal

前端 未结 4 1893
我寻月下人不归
我寻月下人不归 2021-01-31 02:21

I can\'t configure modal height and width using style property. Is there any other way to set modal height and width?

 

        
4条回答
  •  你的背包
    2021-01-31 02:45

    In the Modal documentation it is not mentioned it but it has a style property.

    The following works for me.

    
        
    
    
    const styles = StyleSheet.create({
        modalContent: {
            justifyContent: 'center',
            alignItems: 'center',
            margin: 0
        },
    });
    

提交回复
热议问题