我使用react-native-ui-kitten库:https://akveo.github.io/react-native-ui-kitten/#/docs/ui-components/rkbutton。
并且想让RkButton
将我的长文本包装成几行。但是不知道该怎么做。
当前此:
<RkButton
style={{ backgroundColor: "red", margin: 5 }}
rkType="xlarge"
>
Very very very long text Very very very long text Very very very long text Very very very long text
</RkButton>
我希望它可以将文本换行到下一行。
以下是演示小吃:https://snack.expo.io/HkMDcBpd4。
有什么想法吗?
此致
答案 0 :(得分:0)
我在Reactiflux
不和中获得了一些帮助。原来,唯一缺少的是height: auto
风格的RkButton
。
<RkButton style={{ backgroundColor: "red", margin: 5, height: 'auto' }} rkType="xlarge">
Very long text Very long text Very long text Very long text Very long text
</RkButton>