How to create text border in React Native?

前端 未结 9 1570
清歌不尽
清歌不尽 2021-02-01 14:14

In React-Native, how do I add font borders to Text-components?

I\'ve tried using border and shadow{Color, Radius, Opacity, Offset}, but haven\'

9条回答
  •  心在旅途
    2021-02-01 14:40

    The official docs have this information for you. You can find it on this site: Text Component. There it shows which props you can use to change the behaviour and style of the component. As you can see there are some specific Text styles but also the styles you can apply on a View Component. And if you follow that link it shows you the border styles. So, what you're looking for is maybe:

    borderColor string
    borderTopColor string
    borderRightColor string
    borderBottomColor string
    borderLeftColor string
    borderRadius number
    borderTopLeftRadius number
    borderTopRightRadius number
    borderBottomLeftRadius number
    borderBottomRightRadius number
    borderStyle enum('solid', 'dotted', 'dashed')
    borderWidth number
    borderTopWidth number
    borderRightWidth number
    borderBottomWidth number
    borderLeftWidth number
    

提交回复
热议问题