question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Icon's containerStyle has no effect

See original GitHub issue

Explain 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

containerStyle has no effect

Your Environment (please complete the following information):

software version
react-native-elements ^2.0.2
react-native 0.62.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

1reaction
flyingcirclecommented, Jul 23, 2020

Yes I think that row was created by applying both raised and reverse. and then you can set color={backgroundColor} and reverseColor={iconColor}. I believe that should work. If that doesn’t work, let me know and I can reopen the ticket.

0reactions
cglacetcommented, Aug 24, 2021

Did anyone managed to reproduce the documentation image using only the Icon component?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found