From 5203b8e2674d8b8e19f5ad5008d9e4903164dff5 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Tue, 7 Aug 2018 10:40:36 +0200 Subject: [PATCH] Fix #6 Add a `App/Theme` directory for storing the base application styles --- App/Containers/HomeScreen.js | 27 ++++++++--------- App/Images/README.md | 1 + App/Theme/ApplicationStyles.js | 39 +++++++++++++++++++++++++ App/Theme/Colors.js | 9 ++++++ App/Theme/Fonts.js | 53 ++++++++++++++++++++++++++++++++++ App/Theme/Images.js | 8 +++++ App/Theme/Metrics.js | 31 ++++++++++++++++++++ App/Theme/README.md | 1 + App/Theme/index.js | 7 +++++ README.md | 2 ++ 10 files changed, 165 insertions(+), 13 deletions(-) create mode 100644 App/Images/README.md create mode 100644 App/Theme/ApplicationStyles.js create mode 100644 App/Theme/Colors.js create mode 100644 App/Theme/Fonts.js create mode 100644 App/Theme/Images.js create mode 100644 App/Theme/Metrics.js create mode 100644 App/Theme/README.md create mode 100644 App/Theme/index.js diff --git a/App/Containers/HomeScreen.js b/App/Containers/HomeScreen.js index 8ce6303dc..c99ca9d98 100644 --- a/App/Containers/HomeScreen.js +++ b/App/Containers/HomeScreen.js @@ -4,10 +4,12 @@ import { connect } from 'react-redux' import { PropTypes } from 'prop-types' import ExampleActions from 'App/Stores/Example/Actions' import { isHot } from 'App/Stores/Example/Selectors' +import Fonts from 'App/Theme/Fonts' +import ApplicationStyles from 'App/Theme/ApplicationStyles' const instructions = Platform.select({ - ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', - android: 'Double tap R on your keyboard to reload,\n' + 'Shake or press menu button for dev menu', + ios: 'Press Cmd+R to reload,\nCmd+D or shake for dev menu.', + android: 'Double tap R on your keyboard to reload,\nShake or press menu button for dev menu.', }) class HomeScreen extends React.Component { @@ -23,12 +25,12 @@ class HomeScreen extends React.Component { return ( - Welcome to React Native! + Welcome to React Native! To get started, edit App.js - {instructions} - The weather temperature is: {temperature} - {this.props.isHot ? "It's pretty hot!" : ''} - {this.props.temperatureErrorMessage} + {instructions} + The weather temperature is: {temperature} + {this.props.isHot ? "It's pretty hot!" : ''} + {this.props.temperatureErrorMessage}