Skip to content

Instantly share code, notes, and snippets.

@agustito37
Created October 10, 2020 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agustito37/a8806a2adc241037382a26f8ae913cbe to your computer and use it in GitHub Desktop.
Save agustito37/a8806a2adc241037382a26f8ae913cbe to your computer and use it in GitHub Desktop.
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>
);
};
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
}
};
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