Skip to content

Commit

Permalink
Merge pull request #95 from mendix/feat/navigation-vars
Browse files Browse the repository at this point in the history
Add vars for progressOverlay
  • Loading branch information
wegiswes authored Oct 20, 2020
2 parents 129be1e + f055e5d commit 64b249f
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 17 deletions.
6 changes: 5 additions & 1 deletion styles/native/js/app/custom-variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,12 @@ export const navigation = {
activityIndicatorColor: font.color,
backgroundColor: `rgba(0, 0, 0, 0.5)`,
containerBackgroundColor: background.secondary,
shadowColor: "#000",
fontSize: font.size,
borderRadius: border.radius,
elevation: 1.5,
shadowColor: "#000",
shadowOpacity: 0.1,
shadowRadius: 10,
},
};
//
Expand Down
6 changes: 5 additions & 1 deletion styles/native/js/core/variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,12 @@ let navigation = {
activityIndicatorColor: font.color,
backgroundColor: `rgba(0, 0, 0, 0.5)`,
containerBackgroundColor: background.secondary,
shadowColor: "#000",
fontSize: font.size,
borderRadius: border.radius,
elevation: 1.5,
shadowColor: "#000",
shadowOpacity: 0.1,
shadowRadius: 10,
},
};
navigation = merge(navigation, custom.navigation || {});
Expand Down
10 changes: 5 additions & 5 deletions styles/native/js/core/widgets/navigation.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { border, font, navigation, spacing } from "../variables";
import { font, navigation, spacing } from "../variables";
/*
DISCLAIMER:
Expand Down Expand Up @@ -50,11 +50,11 @@ export const navigationStyle = {
backgroundColor: navigation.progressOverlay.containerBackgroundColor,
paddingHorizontal: spacing.largest,
paddingVertical: spacing.large,
borderRadius: border.radius,
elevation: 1.5,
borderRadius: navigation.progressOverlay.borderRadius,
elevation: navigation.progressOverlay.elevation,
shadowColor: navigation.progressOverlay.shadowColor,
shadowOpacity: 0.1,
shadowRadius: 10,
shadowOpacity: navigation.progressOverlay.shadowOpacity,
shadowRadius: navigation.progressOverlay.shadowRadius,
shadowOffset: {
width: 0,
height: 2,
Expand Down
6 changes: 5 additions & 1 deletion styles/native/ts/app/custom-variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,12 @@ export const navigation: VariablesNavigation = {
activityIndicatorColor: font.color,
backgroundColor: `rgba(0, 0, 0, 0.5)`,
containerBackgroundColor: background.secondary,
shadowColor: "#000", // Only for iOS
fontSize: font.size,
borderRadius: border.radius,
elevation: 1.5, // Only for Android
shadowColor: "#000", // Only for iOS
shadowOpacity: 0.1, // Only for iOS
shadowRadius: 10, // Only for iOS
},
};
//
Expand Down
6 changes: 5 additions & 1 deletion styles/native/ts/core/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,12 @@ let navigation: VariablesNavigation = {
activityIndicatorColor: font.color,
backgroundColor: `rgba(0, 0, 0, 0.5)`,
containerBackgroundColor: background.secondary,
shadowColor: "#000", // Only for iOS
fontSize: font.size,
borderRadius: border.radius,
elevation: 1.5, // Only for Android
shadowColor: "#000", // Only for iOS
shadowOpacity: 0.1, // Only for iOS
shadowRadius: 10, // Only for iOS
},
};
navigation = merge(navigation, custom.navigation || {});
Expand Down
13 changes: 6 additions & 7 deletions styles/native/ts/core/widgets/navigation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { border, font, navigation, spacing } from "../variables";
import { NavigationType } from "../../types/widgets";
import { NavigationType } from "../../types/widgets";
import { font, navigation, spacing } from "../variables";
/*
DISCLAIMER:
Expand Down Expand Up @@ -52,16 +52,15 @@ export const navigationStyle: NavigationType = {
backgroundColor: navigation.progressOverlay.containerBackgroundColor,
paddingHorizontal: spacing.largest,
paddingVertical: spacing.large,
borderRadius: border.radius,
elevation: 1.5,
borderRadius: navigation.progressOverlay.borderRadius,
elevation: navigation.progressOverlay.elevation,
shadowColor: navigation.progressOverlay.shadowColor,
shadowOpacity: 0.1,
shadowRadius: 10,
shadowOpacity: navigation.progressOverlay.shadowOpacity,
shadowRadius: navigation.progressOverlay.shadowRadius,
shadowOffset: {
width: 0,
height: 2,
},

},
activityIndicator: {
// Color, Size & All ViewStyle properties are allowed
Expand Down
6 changes: 5 additions & 1 deletion styles/native/ts/types/variables.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,12 @@ export interface VariablesNavigation {
activityIndicatorColor: string,
backgroundColor: string,
containerBackgroundColor: string,
shadowColor: string,
fontSize: number
borderRadius: number,
elevation: number,
shadowColor: string,
shadowOpacity: number,
shadowRadius: number,
}
}

Expand Down

0 comments on commit 64b249f

Please sign in to comment.