Skip to content

Source icon is not a valid icon name for family "material-community" #4712

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
trandactri opened this issue May 4, 2025 · 3 comments
Closed
Labels
bug Icon related to internally used icon component based on MaterialCommunityIcons from react-native-paper

Comments

@trandactri
Copy link

Current behaviour

When using the icon source as receipt-text, I get the issue

"receipt-text" is not a valid icon name for family "material-community"

Expected behaviour

The icon should display the below icon without any error

Image

How to reproduce?

  1. Create an Icon tag
    <Icon/>
  2. Assign the source icon as receipt-text as
    <Icon source="receipt-text" size={24} color={MD3Colors.primary70}/>

Preview

The UI shows the question mark icon

Image

What have you tried so far?

  • Removed node-modules folder
  • Re-install react-native-paper via npm install react-native-paper

Your Environment

software version
ios 18.4
android x
react-native 0.76.9
react-native-paper 5.14.0
node 22.11.0
npm or yarn 10.9.0
expo sdk 52.0.43
@trandactri trandactri added the bug label May 4, 2025
@lukewalczak
Copy link
Member

Hey @trandactri, which library for icons did you use?

@lukewalczak lukewalczak added the Icon related to internally used icon component based on MaterialCommunityIcons from react-native-paper label May 4, 2025
@lukewalczak
Copy link
Member

I guess you are using either @expo/vector-icons or [email protected] since both of them do not contain receipt-text icon.

I've improved the icons guide documentation to be able to switch between the latest and old version of react-native-vector-icons to browse available icons.

@trandactri
Copy link
Author

Hey @lukewalczak, thanks for leaving the guide. I've tried installing the latest npm install @react-native-vector-icons/material-design-icons and the log was gone.

Image

However, the icon still rendered the question mark. I am not sure why as there's no issue at all. Could you take a look and let me know what happens?

Image

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Icon related to internally used icon component based on MaterialCommunityIcons from react-native-paper
Projects
None yet
Development

No branches or pull requests

2 participants