I want to encircle react-native-vector icons. I have added a border radius in the style but it not helpful for all devices and also with every icon it behaves different.
<Icon name={'ios-grid-outline'} style={{ color: "rgb(170, 207, 202)",
borderRadius:10,
borderWidth: 2,
borderColor: 'rgb(170, 207, 202)',
}} />
Link to react native vector icons: https://oblador.github.io/react-native-vector-icons/
Try adding the overflow:"hidden"
option to your style
<Icon name={'ios-grid-outline'} style={{
color: "rgb(170, 207, 202)",
borderRadius:10,
borderWidth: 2,
borderColor: 'rgb(170, 207, 202)',
overflow: "hidden"
}} />
Try to wrap it inside a View
as a container
<View
style={{
width: 10,
height: 10,
borderRadius: 5,
borderWidth: 2,
borderColor: 'rgb(170, 207, 202)'
}}>
<Icon name={'ios-grid-outline'} style={{...}} />
</View>
Change the width and height to your own preference of course.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With