[英]React-native icon inline with text
Hi I want achieve the following style:嗨,我想实现以下风格:
But with the following code i get a the icon in separate column and the text in another但是使用下面的代码,我在单独的列中得到了一个图标,在另一个列中得到了文本
<View style={{flex:1, flexDirection:'row'}}>
<Icon height={10} width={10} />
<Text>It is a long established fact that a reader will be distracted by the readable
content of a page when looking at its layout. The point of using Lorem Ipsum is that it
has a more-or-less normal distribution of letters, as opposed to using 'Content here,
content here'
</Text>
</View>
please ignore the different icons.请忽略不同的图标。 Any solution to this problem?
这个问题有什么解决办法吗?
actually, you can embed the icon within the text, like this:实际上,您可以在文本中嵌入图标,如下所示:
<View style={{flex:1, flexDirection:'row'}}>
<Text>
<Icon height={10} width={10} />
It is a long established fact that a reader will be distracted by the readable
content of a page when looking at its layout. The point of using Lorem Ipsum is that it
has a more-or-less normal distribution of letters, as opposed to using
'Content here, content here'
</Text>
</View>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.