Icon's containerStyle has no effect
See original GitHub issueExplain what you did
Trying to set backgroundColor
of <Icon>
component something like this:
<Icon
name="arrow-right"
type="font-awesome"
containerStyle={{backgroundColor: 'red'}}
raised
/>
Expected behavior
Background color should have been red.
Describe the bug
Background color stays the default value
To Reproduce
Try creating an icon as specified earlier
Screenshots
Your Environment (please complete the following information):
software | version |
---|---|
react-native-elements | ^2.0.2 |
react-native | 0.62.2 |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
Some react-native vector icons are not shown - Stack Overflow
How to fix this problem? This is my code: import React, { Component } from 'react'; import { Image, StyleSheet, View } from...
Read more >debox-react-native-elements - npm package - Snyk
If you have any issues with icons not working or installation of React Native Vector Icons, check out their installation guide here ...
Read more >Button - React Native Elements
Buttons are touchable elements used to interact with the screen. They may display text, icons, or both. Buttons can be styled with several...
Read more >Components - NativeBase
NativeBase includes components such as anatomy of your app screens, header, input, buttons, badge, icon, form, checkbox, radio-button, list, card, ...
Read more >Topic: Social media on widget? | Themeco Community
Replace the # with your social URL and icon type with an icon listed ... Would like a mouseover effect on the icon,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes I think that row was created by applying both
raised
andreverse
. and then you can setcolor={backgroundColor}
andreverseColor={iconColor}
. I believe that should work. If that doesn’t work, let me know and I can reopen the ticket.Did anyone managed to reproduce the documentation image using only the Icon component?