Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6213

change color of full Modal

$
0
0

I'm using a react native modal. I am trying to use a backgroundColor to fill the whole modal. However, the color is only applied to the top. Why is this so?

How can I fix this and apply the color to the whole modal view?

return (<Modal visible={isUserVisible}><View style={styles.container}>      {/* <View> */}<View><TouchableOpacity            style={styles.cross}            onPress={() => setIsUserVisible(false)}><Thumbnail              source={{                uri:'https://cdn0.iconfinder.com/data/icons/very-basic-android-l-lollipop-icon-pack/24/close-512.png',              }}></Thumbnail></TouchableOpacity><Text>HELLOO</Text></View><View style={styles.searchLocationContainer}><UserInfoContainer            firstName={firstName}</UserInfoContainer></View></View></Modal>
export const styles = StyleSheet.create({  container: {    backgroundColor: '#323443',    //backgroundColor: 'red',  },  button: {    paddingTop: 0,  },  text: {    color: 'black',  },  cross: {    paddingTop: 50,    paddingLeft: 40,  },  searchLocationContainer: {    flex: 1,  },});

enter image description here

enter image description here

The greyish thing is from a pangesturehandler coming from UserInfoContainer.


Viewing all articles
Browse latest Browse all 6213

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>