border top/left/bottom/right width not working
I have this in my render method:
return View(
{ style: { flex: 1 } },
TouchableWithoutFeedback(
{ onPress: this.handlePress },
View({
style: {
flex: 0,
backgroundColor: 'gray',
height: 50,
alignItems: 'center',
justifyContent: 'center',
borderWidth: 1,
borderColor: 'white'
},
}, Text({ style: { color: 'white' }}, "^"))
),
TouchableWithoutFeedback(
{ onPress: this.handlePress },
View({
style: {
flex: 0,
backgroundColor: 'gray',
height: 50,
alignItems: 'center',
justifyContent: 'center'
},
}, Text({ style: { color: 'white' }}, "v"))
)
)
It renders this:

But if I change the borderWidth in the first component to borderBottomWidth or any of the other top/left/bottom/right methods, there is no border. There should be a white border on one side of the component:

Yup, you noticed! So, the story here is that borders on only one side are not natively supported by iOS, we did some bad hacks in our fb codebase to support it.
We want to rewrite it cleanly in OSS. Make sure it supports borderRadius, and does the same diagonal appearance when there are two adjacent borders with a different color/size.
Should be working now
It's not yet working for me (on 0.4.0)
Argh, nevermind, Apparently it is not activated for <Text /> nodes and I'm now wrapping a <View /> around them.
Can confirm that this works in 0.8.0 for <View />
But is there a reason why it doesn't support <Text />?
+1 for <Text /> support
:+1: I need this for <TextInput />
+1 for <TextInput />
+1 for <Text />
Any news on support for <Text />?
+1 for <TextInput /> as well
Can you add it to https://productpains.com/product/react-native/ so that we can figure out prioritization?
fyi: https://productpains.com/post/react-native/add-borderwidth-left-right-top-bottom-to-textinput-/
+1
@ide, you guys don't have labels for these types of issues?
Definitely need it for <TextInput />
+1 on <TextInput />
+1 <TextInput />
+1 <TextInput />, Googling brought me to this issue.
Ugh, spent hours banging my head against the wall trying to figure this out before I found this... +1 gajillion to make this work everywhere the docs say it should, like TextInput...