-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
FAB.Group actions accepts a IconSource, not only a string #1055
Comments
The FAB component only supports string even in FAB group because the FAB group used the FAB component as a child element. So the compiler is doing its job correctly. Note paper only supports icon from material.io in v3 they are planning to add custom fonts support. |
You mean the FAB component from the link above? Looking at the source it's declared that it supports a |
Yes, it supports |
I would like to fix this issue! |
@Taym95 if you want to fix ok, else I could do it but it will take some days till I get some time for it |
Environment
"react-native-paper": "2.15.0"
and TypescriptDescription
I was looking at the docs to see if i could use a custom icon source on the
FAB.Group
actions
, but the type for the actions icon is specified as a string:react-native-paper/src/components/FAB/FABGroup.js
Lines 32 to 39 in 5935fb4
But the signature is wrong, looking at the
FAB.Group
source, the action list actually can receive aIconSource
just like the normalFAB
:react-native-paper/src/components/FAB/FABGroup.js
Lines 283 to 287 in 5935fb4
Reproducible Demo
I think that just a simple component using typescript and a icon source on the actions will
give you the compile error:
I managed to make my code compile making a cast (
as unknown as FABGroupAction[]
) on the list before using it on the componentThe text was updated successfully, but these errors were encountered: