Skip to content

Commit

Permalink
feat: Add more brands
Browse files Browse the repository at this point in the history
  • Loading branch information
jar0s committed Sep 21, 2020
1 parent 523059f commit 80fe6f8
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
38 changes: 38 additions & 0 deletions App/brands/acme/ButtonStyles.js
Original file line number Diff line number Diff line change
@@ -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"
}
});
16 changes: 16 additions & 0 deletions App/brands/calc_co/MainStyles.js
Original file line number Diff line number Diff line change
@@ -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
}
});
6 changes: 5 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -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']
}]
]
};
Expand Down

0 comments on commit 80fe6f8

Please sign in to comment.