Created
October 10, 2020 16:53
-
-
Save agustito37/a8806a2adc241037382a26f8ae913cbe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BLUE_COLOR } from './globalStyles'; | |
import { styles } from './styles'; | |
export default () => { | |
return ( | |
<View style={styles.local}> | |
<Text style={{ color: BLUE_COLOR }}>Hello World!</Text> | |
</View> | |
); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const RED_COLOR = '#ff0000'; | |
export const GREEN_COLOR = '#00ff00'; | |
export const BLUE_COLOR = '#0000ff'; | |
export const globalStyles = { | |
global: { | |
flex: 1, | |
flexDirection: row, | |
backgroundColor: RED_COLOR | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { globalStyles, BLUE_COLOR } from './globalStyles'; | |
import Stylesheet from 'react-native'; | |
export const styles = Stylesheet.create({ | |
local: { | |
...globalStyles.container, | |
backgroundColor: GREEN_COLOR | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment