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.

Can't change the color of components

See original GitHub issue

I use the color attributes to Icon component but the color of it is the default color, which is not changed. <Icon name="list" color="#38adff" /> The same as the other components. What’s wrong with this problem?

        "@expo/vector-icons": "^5.0.0",
        "enzyme": "^2.8.2",
        "native-base": "^2.2.0",

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
horiuchiecommented, Jul 1, 2017

Hello. You can include color prop within style attribute. From docs:

<Icon name="list" style={{ color: "#38adff" }} />
3reactions
shivrajkumarcommented, Jul 11, 2017

@scq000 With NativeBase v2, al the components are themed. Similarly the Icon component also has some theme applied to it. Say fontSize, color etc. To override those you need to apply i through style attributes. And if you want to use color prop for your icons. You can remove color theme attribute of Icon in ejected theme.http://docs.nativebase.io/Customize.html#Customize Hope that makes sense

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't change colors or materials on some components - Pro
I've been trying to figure out why I can't change materials on some components while other components work. What have I been doing...
Read more >
I can't change color of child element - Figma Community Forum
I can change the colors in the component, but for some children have bugs with color change. It is displayed as in all...
Read more >
Change colour of component in project? - Autodesk Community
Solved: Hi, i'd like to change to red the colour of the component you can see in the attached project...the component has been...
Read more >
Error when trying to change the color of a component - Discuss
Whenever I try to change the color of a component, it gives an error and I can't change it. Can anyone who has...
Read more >
Material Component is not able to change color - Stack Overflow
Are you sure it responds to your changes? · yes, when not use style HintText then "trip titpe" is with white color please...
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