反应本机元素右箭头图标不起作用
react native elements right arrow icon not working
我正在使用 react-native-elements
库,我试图在我的一个组件中显示 Entypo
向右箭头图标,但名称 'arrow-right' 不起作用。相反,我看到了一个问号。
<Icon name="arrow-right" size={20} color="black" />
我从这里得到图标名称:https://oblador.github.io/react-native-vector-icons/。
从 react-native-elements
导入 Icon
实际上是正确的方法,因为您可以访问 react-native-elements
提供的额外道具(例如 raised
道具).问题是您需要指定 type
。 type
属性确定将使用哪个图标集。
import { Icon } from 'react-native-elements'
<Icon name="arrow-right" size={20} color="black" type="entypo" />
此处列出了所有可用的图标集和属性:https://react-native-elements.github.io/react-native-elements/docs/icon。
我正在使用 react-native-elements
库,我试图在我的一个组件中显示 Entypo
向右箭头图标,但名称 'arrow-right' 不起作用。相反,我看到了一个问号。
<Icon name="arrow-right" size={20} color="black" />
我从这里得到图标名称:https://oblador.github.io/react-native-vector-icons/。
从 react-native-elements
导入 Icon
实际上是正确的方法,因为您可以访问 react-native-elements
提供的额外道具(例如 raised
道具).问题是您需要指定 type
。 type
属性确定将使用哪个图标集。
import { Icon } from 'react-native-elements'
<Icon name="arrow-right" size={20} color="black" type="entypo" />
此处列出了所有可用的图标集和属性:https://react-native-elements.github.io/react-native-elements/docs/icon。