From 80fe6f8aa9b3edd58b28bacaedcd1258f000af12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Marek?= Date: Mon, 21 Sep 2020 22:27:34 +1200 Subject: [PATCH] feat: Add more brands --- App/brands/acme/ButtonStyles.js | 38 ++++++++++++++++++++++++++++++++ App/brands/calc_co/MainStyles.js | 16 ++++++++++++++ babel.config.js | 6 ++++- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 App/brands/acme/ButtonStyles.js create mode 100644 App/brands/calc_co/MainStyles.js diff --git a/App/brands/acme/ButtonStyles.js b/App/brands/acme/ButtonStyles.js new file mode 100644 index 0000000..510fb68 --- /dev/null +++ b/App/brands/acme/ButtonStyles.js @@ -0,0 +1,38 @@ +import { StyleSheet, Dimensions } from 'react-native' + +const screen = Dimensions.get("window"); +const buttonWidth = screen.width / 4; + +export default StyleSheet.create({ + text: { + color: "#fdf6e3", + fontSize: 25 + }, + textAccent: { + color: "#b58900" + }, + textSecondary: { + color: "#060606" + }, + button: { + backgroundColor: "#073642", + flex: 1, + height: Math.floor(buttonWidth - 10), + alignItems: "center", + justifyContent: "center", + borderRadius: Math.floor(buttonWidth), + margin: 5 + }, + buttonDouble: { + width: screen.width / 2 - 10, + flex: 0, + alignItems: "flex-start", + paddingLeft: 40 + }, + buttonSecondary: { + backgroundColor: "#a6a6a6" + }, + buttonAccent: { + backgroundColor: "#586e75" + } + }); \ No newline at end of file diff --git a/App/brands/calc_co/MainStyles.js b/App/brands/calc_co/MainStyles.js new file mode 100644 index 0000000..90a1e2b --- /dev/null +++ b/App/brands/calc_co/MainStyles.js @@ -0,0 +1,16 @@ +import { StyleSheet } from 'react-native' + +export default StyleSheet.create({ + container: { + flex: 1, + backgroundColor: "#fdf6e3", + justifyContent: "flex-end" + }, + value: { + color: "#586e75", + fontSize: 40, + textAlign: "left", + marginLeft: 20, + marginBottom: 10 + } + }); \ No newline at end of file diff --git a/babel.config.js b/babel.config.js index 8216d11..cdecf96 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,10 +1,14 @@ +const brandPath = `./App/brands/${process.env.APP_BRAND}`; + +console.log(`Bundling for the brand: ${process.env.APP_BRAND}`); + module.exports = function(api) { api.cache(true); return { presets: ['babel-preset-expo'], plugins: [ ['module-resolver', { - root: ['./App', './App/brands/default'] + root: ['./App', brandPath, './App/brands/default'] }] ] };