问题标签 [vector-icons]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - 按 React Native 更改矢量图标
我有一个名为 ChecklistCard.js 的卡片组件。我的目标是将按下时 CheckboxPlaceholder 中的 Feather 图标从“正方形”更改为“复选框”,并更改图标的颜色。这是我已经拥有的。
react-native - 失败的道具类型:提供给“图标”的价值“shield-bug”的无效道具“名称”
我正在尝试以这种方式从 @expo/vector-icons 库导入的 Material Community Icons 中获取一个图标
@expo/vector-icons库中确实存在该图标,但是当我尝试使用它时,出现以下错误:
失败的道具类型:提供给
name
的价值道具无效,应为 ["ab-testing","access-point","access-point-network","access-point-network-off","account","帐户警报","帐户警报大纲","帐户左箭头","帐户左箭头","帐户右箭头","帐户右箭头","帐户徽章","帐户徽章警报"...shield-bug
Icon
我觉得这很奇怪,因为图标名称出现在 Expo 的库中,但在错误列表中却没有。我一直在尝试其他图标,它们工作正常,但这个没有。会发生什么?
typescript - type for React navigation tabBarIcon
I'm trying to find a type for Icon component in the below code. I'm using react Navigation and importing
Ionicons and FontAwesome is showing the following typescript error.
When I look up the type for Ionicons or FontAwesome its saying Icons<> but i'm not able to find where to import that type from.
typescript - 依赖于其他字段的接口属性重复
我正在为expo-vector-icons
. 这是目前为止的界面。
我想用打字稿生成相同的道具。但我看到我正在复制界面中的name
字段。AppIconProps
有什么办法可以消除这种重复吗?
基本上,现在AntDesign
和接口领域都有Entypo
。假设我还想添加图标(我在顶部导入),所以添加我要做的是,name
AppIconProps
Feather
如您所见,这看起来不太好,那么还有其他方法可以编写此接口吗?那么名称字段应该取决于该family
字段吗?