![](/img/trans.png)
[英]Icons not showing in React Native + React Native Paper app
[英]React Native Paper Icons repository
我一直在努力找出用於圖標的 React Native Paper 的存儲庫,使用 React Native Paper 設計 APP 變得非常容易,但弄清楚 Icon 名稱有點困難。
React Native Paper 默認使用 Material Community 圖標,很難弄清楚圖標名稱,下面是備忘單的 CDN URL,只需從 Valla 的任何圖標名稱中刪除mdi- 即可!
https://cdn.materialdesignicons.com/5.4.55/
示例:- 在備忘單中的名稱是mdi-comment-outline ,從這個名稱中刪除mdi-就是這樣!!
<List.Item
title="First Item"
description="Item description"
left={props => <List.Icon {...props} icon="comment-outline" />}
/>
我使用這個網站: https://materialdesignicons.com/
需要等待幾秒鍾,然后所有圖標將顯示 Good search bar for quick search
它使用Material Design Icons作為圖標庫,如果你想添加圖標,那么這種技術肯定會起作用:
import { mdiAccountSchool } from '@mdi/js';
.mdiAccountSchool
=> account-school
。這肯定會奏效!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.