How do I do a separator line with a dot in the middle on react native?

Viewed 34

I want to do a line like this one, but I don't know how (btw the text on the image is in spanish, but it does not matter).enter image description here

3 Answers

You can draw a separator with flexbox properties even with a text or view or anything you want in the center of the line.

<View style={{flexDirection: 'row', alignItems: 'center'}}>
  <View style={{flex: 1, height: 1, backgroundColor: 'black'}} />
  <View>
    <Text style={{textAlign: 'center', paddingHorizontal:8}}>Hello</Text>
  </View>
  <View style={{flex: 1, height: 1, backgroundColor: 'black'}} />
</View>

enter image description here

Related