带有文本的React本机图标

时间:2019-12-14 12:02:27

标签: android ios react-native react-native-svg react-native-text

嗨,我想实现以下风格:

enter image description here

但是使用以下代码,我在单独的列中获得了一个图标,而在另一列中获得了文本

<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>

enter image description here

请忽略不同的图标。 这个问题有解决办法吗?

1 个答案:

答案 0 :(得分:1)

实际上,您可以将图标嵌入文本中,如下所示:

for