Skip to content
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

Disable material community icons #3688

Closed
RichardLindhout opened this issue Feb 18, 2023 · 5 comments · Fixed by #3699
Closed

Disable material community icons #3688

RichardLindhout opened this issue Feb 18, 2023 · 5 comments · Fixed by #3699
Assignees
Labels
feature request Icon related to internally used icon component based on MaterialCommunityIcons from react-native-paper

Comments

@RichardLindhout
Copy link
Contributor

RichardLindhout commented Feb 18, 2023

Is your feature request related to a problem? Please describe.
I don't want to add the material community icons

Describe the solution you'd like
I want the library to use the override Icon everywhere instead of somethings falling back to MaterialCommunityIcon (this should be done by the user). I want to overridde the material community icon en implement svg icons

Additional context
I believe this PR was not good: #1630

Example in RNP code: https://github.com/callstack/react-native-paper/blob/main/src/components/Checkbox/CheckboxAndroid.tsx#L146

Maybe we could provide an internal implementation of the MaterialCommunityIcon in the provider too?

@RichardLindhout RichardLindhout changed the title Disable material icons Disable material community icons Feb 18, 2023
@lukewalczak
Copy link
Member

Hey @RichardLindhout, according to the Icons doc if you don't want to instal MaterialCommunityIcon you can use babel-plugin-optional-require:

If you opted out of vector icons support using babel-plugin-optional-require, you won't be able to use icon names for the icon prop. Some components may not look correct without vector icons and might need extra configuration.

Also according to point no 4:

If you want to use icons other than MaterialCommunityIcons you need to import the icons and pass it to the settings prop within PaperProvider.

@RichardLindhout
Copy link
Contributor Author

Yes I did that but on some components it does not use this settings icon

@lukewalczak
Copy link
Member

I see, had to overlook that information. Basically what we have to do is replace the MaterialCommunityIcon used in a couple of components in favour of internal Icon component

@RichardLindhout
Copy link
Contributor Author

Yes indeed :)
I use this component and override also some internal icons in react-native-paper-dates but suddenly I saw the checkbox did not work

@lukewalczak lukewalczak self-assigned this Feb 20, 2023
@lukewalczak lukewalczak added the Icon related to internally used icon component based on MaterialCommunityIcons from react-native-paper label Feb 27, 2023
@lukewalczak
Copy link
Member

Unofrtunately I handled that ticket wrongly and introduced the breaking change in 5.3.0 that's why I had to revert it, to avoid users confusion and further problems.

I will try to re-investigate that topic and apply the correct changes.

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

Successfully merging a pull request may close this issue.

2 participants