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

iconColor is not working on icons for the main floating button #218

Open
meerita opened this issue Oct 18, 2022 · 0 comments
Open

iconColor is not working on icons for the main floating button #218

meerita opened this issue Oct 18, 2022 · 0 comments

Comments

@meerita
Copy link

meerita commented Oct 18, 2022

Hi there,

I just tried to use the iconColor prop, to tint the color of the icons I use on the main buttons and it doesn't work.

<FloatingAction actions={actions} onPressItem={name => { console.log(selected button: ${name}); }} color={darkMode ? Colors.dark.primary : Colors.light.primary} iconWidth={24} iconHeight={24} iconColor='#FF0000' floatingIcon={require('../../assets/images/icons/event.png')} actionsPaddingTopBottom={4} />

After checking the source code, I've noticed that the element doesn't support tintColor at all.

return ( <Image style={{ width: iconWidth, height: iconHeight }} source={floatingIcon} /> );

In order to change the color of the icon, both cases must allow style={{ tintColor: iconColor }} otherwise the icon remains with the original color I have on the image.

On the meantime I will create white icons images so I don't need to tint them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant