Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

How to manipulate Colors in Colors File, using boolean values from another component?

$
0
0

I have this file for colors in my app:

export default Colors = {      dark: "black",      medium: "#110c11",      light: "#1a1110",      icon: "white",      iconG: "grey"    };

and in another file, I have class component with these states:

 this.state = {      darkTheme: true,      whiteTheme: false,      RedTheme: false    };

i want to manipulate Color in Colors.js based on the boolean values of these themes. for example if whiteTheme: true, then i want to change Colors according to white theme.


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>