=========
react-native-hr brings htmls' <hr />
to react-native.
It also brings some extra functionality:
- Overayling text onto the line.
- Changing text style.
- Changing line style.
Name | Type | Description |
lineStyle |
Object |
(Optional) The style object for line(View). |
text |
string |
(Optional) The text to display on the line (centered) |
textStyle |
Object |
(Optional) The color of the text |
<Hr />
<Hr marginLeft={50} />
<Hr text="react-native" />
<Hr text="text style"
textStyle={{
color: "red", fontSize: 20,
textDecorationLine: "underline",
textDecorationStyle: "solid",
textDecorationColor: "#000"
}}
/>
<Hr text="line style"
lineStyle={{
backgroundColor: "blue",
height: 4
}}
/>
<Hr lineColor='red' text='line style and text style'
lineStyle={{
backgroundColor: "blue",
height: 2
}}
textStyle={{
color: "green",
fontSize: 20,
textDecorationLine: "underline",
textDecorationStyle: "solid",
textDecorationColor: "#000"
}}
/>