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

Border Extends out of outline

$
0
0

I have a simple textbox to which i have given an outline. However, If you look closely you will see that the border and the border outline dont match. The white color of the View extends out of the border outline as well. How can I fix this?

export const AddressTextBox: React.FunctionComponent<AddressTextBoxProps> = ({  placeName,}) => {  return (<View style={styles.textBox}><Text style={styles.text}>{placeName}</Text></View>  );};export const styles = StyleSheet.create({  textBox: {    backgroundColor: 'white',    height: moderateScale(50),    width: '70%',    marginTop: moderateScale(40),    alignSelf: 'center',    borderRadius: moderateScale(20),    borderColor: '#383838',    borderWidth: 0.3,    alignItems: 'center',    flexDirection: 'row',  },  text: {    fontSize: moderateScale(13),    flex: 1,    marginHorizontal: 10,    textAlign: 'center',  },});

enter image description here

Edit:

The problem doesn't exist in iOS simulator but does occur in Android phones.


Viewing all articles
Browse latest Browse all 6214

Trending Articles



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