Text inside icon - react-native
I am trying to achieve something like this in react native.
In 'react-native-icon' we have direct implementation by using stacked icon as given by this link. Although the same thing is not working in react-native-vector-icon. And react-native-icon is no more supported. Any idea can this behavior be achieved by font-awesome or any suggestion for this kind a drawing in react-native. Or any ways to implement fa-stack-1x in react native.
PS: Please ignore the green patch in Image
Maybe make something like this?
<View>
<Icon/> // with position absolute
<Text>1</Text>
</View>
Something like this? It may need some refinement, though.
<View
style={{
width: 100,
height: 100,
borderRadius: 50,
backgroundColor: '#000000',
alignItems: 'center',
justifyContent: 'center'
}}>
<Text style={{color: '#ffffff'}}>1</Text>
</View>
Comments
Post a Comment