This file contains hidden or 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 default class MyComponent extends Component { | |
| render() { | |
| return ( | |
| <View style={styles.container} /> | |
| ); | |
| } | |
| } | |
| const styles = StyleSheet.create({ | |
| container: { |
This file contains hidden or 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 styles from './styles'; | |
| export default class MyComponent extends Component { | |
| render() { | |
| return ( | |
| <View style={styles.container} /> | |
| ); | |
| } | |
| } |
This file contains hidden or 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
| const styles = StyleSheet.create({ | |
| container: { | |
| // My styles | |
| }, | |
| }); | |
| export default styles; |
This file contains hidden or 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
| // src/styles/index.js | |
| import colors from './colors'; | |
| import fonts from './fonts'; | |
| import metrics from './metrics'; | |
| import general from './general'; | |
| export { colors, fonts, metrics, general }; | |
| // src/styles/colors.js |
This file contains hidden or 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
| // src/styles/index.js | |
| import colors from './colors'; | |
| import fonts from './fonts'; | |
| import metrics from './metrics'; | |
| import general from './general'; | |
| export { colors, fonts, metrics, general }; |
This file contains hidden or 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
| // src/styles/colors.js | |
| const colors = { | |
| header: '#333333', | |
| primary: '#069', | |
| }; | |
| export default colors; |
This file contains hidden or 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
| // src/styles/fonts.js | |
| const fonts = { | |
| input: 16, | |
| regular: 14, | |
| medium: 12, | |
| small: 11, | |
| tiny: 10, | |
| }; |
This file contains hidden or 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
| // src/styles/metrics.js | |
| import { Dimensions, Platform } from 'react-native'; | |
| const { width, height } = Dimensions.get('window'); | |
| const metrics = { | |
| smallMargin: 5, | |
| baseMargin: 10, | |
| doubleBaseMargin: 20, |
This file contains hidden or 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
| // src/styles/general.js | |
| import metrics from './metrics'; | |
| import colors from './colors'; | |
| import fonts from './fonts'; | |
| const general = { | |
| container: { | |
| flex: 1, | |
| backgroundColor: colors.background, |
This file contains hidden or 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 { StyleSheet } from 'react-native'; | |
| import { general } from 'styles'; | |
| const styles = StyleSheet.create({ | |
| ...general, | |
| }); | |
| export default styles; |