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

draw a vertical line between 2 objects

$
0
0

Is it possible to draw a vertical line between 2 text objects? I looked into this but this is not exactly what I need:

https://reactjsexample.com/draw-a-line-between-two-elements-in-react/

enter image description here

<View style={styles.ridesFriends}><Text style={styles.numbers}>132    </Text><Text style={styles.numbers}>{numberOfFriends}</Text></View>
  ridesFriends: {    paddingTop: 70,    alignItems: 'center',    flexDirection: 'row',    justifyContent: 'space-evenly',    width: '100%',  },  numbers: {    fontSize: 30,    color: '#31C283',    fontWeight: 'bold',  },

Edit:

I tried adding a view in between the two numbers:

  verticleLine:{    height: '100%',    width: 1,    backgroundColor: '#909090',  },
<View style={styles.ridesFriends}><Text style={styles.numbers}>132</Text><View style={styles.verticleLine}></View><Text style={styles.numbers}>{numberOfFriends}</Text></View>

but it's not in the centerenter image description here


Viewing all articles
Browse latest Browse all 6213

Trending Articles



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