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",
Hello.
You can include color prop within style attribute.
From docs:
<Icon name="list" style={{ color: "#38adff" }} />
@horiuchie Sure, I know use style attribute can take effect. But why I use the color attribute without effect?
@scq000
Well, I think it is impossible to use "color attribute" according to the document.
Renders icon with defined color.
Include this prop within style
@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
@scq000 Can you close this issue if you are cleared with the doubt?
Most helpful comment
Hello.
You can include color prop within style attribute.
From docs: