Skip to content

Commit 64b249f

Browse files
authored
Merge pull request #95 from mendix/feat/navigation-vars
Add vars for progressOverlay
2 parents 129be1e + f055e5d commit 64b249f

File tree

7 files changed

+36
-17
lines changed

7 files changed

+36
-17
lines changed

styles/native/js/app/custom-variables.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,12 @@ export const navigation = {
192192
activityIndicatorColor: font.color,
193193
backgroundColor: `rgba(0, 0, 0, 0.5)`,
194194
containerBackgroundColor: background.secondary,
195-
shadowColor: "#000",
196195
fontSize: font.size,
196+
borderRadius: border.radius,
197+
elevation: 1.5,
198+
shadowColor: "#000",
199+
shadowOpacity: 0.1,
200+
shadowRadius: 10,
197201
},
198202
};
199203
//

styles/native/js/core/variables.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,12 @@ let navigation = {
193193
activityIndicatorColor: font.color,
194194
backgroundColor: `rgba(0, 0, 0, 0.5)`,
195195
containerBackgroundColor: background.secondary,
196-
shadowColor: "#000",
197196
fontSize: font.size,
197+
borderRadius: border.radius,
198+
elevation: 1.5,
199+
shadowColor: "#000",
200+
shadowOpacity: 0.1,
201+
shadowRadius: 10,
198202
},
199203
};
200204
navigation = merge(navigation, custom.navigation || {});

styles/native/js/core/widgets/navigation.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { border, font, navigation, spacing } from "../variables";
1+
import { font, navigation, spacing } from "../variables";
22
/*
33
44
DISCLAIMER:
@@ -50,11 +50,11 @@ export const navigationStyle = {
5050
backgroundColor: navigation.progressOverlay.containerBackgroundColor,
5151
paddingHorizontal: spacing.largest,
5252
paddingVertical: spacing.large,
53-
borderRadius: border.radius,
54-
elevation: 1.5,
53+
borderRadius: navigation.progressOverlay.borderRadius,
54+
elevation: navigation.progressOverlay.elevation,
5555
shadowColor: navigation.progressOverlay.shadowColor,
56-
shadowOpacity: 0.1,
57-
shadowRadius: 10,
56+
shadowOpacity: navigation.progressOverlay.shadowOpacity,
57+
shadowRadius: navigation.progressOverlay.shadowRadius,
5858
shadowOffset: {
5959
width: 0,
6060
height: 2,

styles/native/ts/app/custom-variables.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,12 @@ export const navigation: VariablesNavigation = {
213213
activityIndicatorColor: font.color,
214214
backgroundColor: `rgba(0, 0, 0, 0.5)`,
215215
containerBackgroundColor: background.secondary,
216-
shadowColor: "#000", // Only for iOS
217216
fontSize: font.size,
217+
borderRadius: border.radius,
218+
elevation: 1.5, // Only for Android
219+
shadowColor: "#000", // Only for iOS
220+
shadowOpacity: 0.1, // Only for iOS
221+
shadowRadius: 10, // Only for iOS
218222
},
219223
};
220224
//

styles/native/ts/core/variables.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,12 @@ let navigation: VariablesNavigation = {
211211
activityIndicatorColor: font.color,
212212
backgroundColor: `rgba(0, 0, 0, 0.5)`,
213213
containerBackgroundColor: background.secondary,
214-
shadowColor: "#000", // Only for iOS
215214
fontSize: font.size,
215+
borderRadius: border.radius,
216+
elevation: 1.5, // Only for Android
217+
shadowColor: "#000", // Only for iOS
218+
shadowOpacity: 0.1, // Only for iOS
219+
shadowRadius: 10, // Only for iOS
216220
},
217221
};
218222
navigation = merge(navigation, custom.navigation || {});

styles/native/ts/core/widgets/navigation.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { border, font, navigation, spacing } from "../variables";
2-
import { NavigationType } from "../../types/widgets";
1+
import { NavigationType } from "../../types/widgets";
2+
import { font, navigation, spacing } from "../variables";
33
/*
44
55
DISCLAIMER:
@@ -52,16 +52,15 @@ export const navigationStyle: NavigationType = {
5252
backgroundColor: navigation.progressOverlay.containerBackgroundColor,
5353
paddingHorizontal: spacing.largest,
5454
paddingVertical: spacing.large,
55-
borderRadius: border.radius,
56-
elevation: 1.5,
55+
borderRadius: navigation.progressOverlay.borderRadius,
56+
elevation: navigation.progressOverlay.elevation,
5757
shadowColor: navigation.progressOverlay.shadowColor,
58-
shadowOpacity: 0.1,
59-
shadowRadius: 10,
58+
shadowOpacity: navigation.progressOverlay.shadowOpacity,
59+
shadowRadius: navigation.progressOverlay.shadowRadius,
6060
shadowOffset: {
6161
width: 0,
6262
height: 2,
6363
},
64-
6564
},
6665
activityIndicator: {
6766
// Color, Size & All ViewStyle properties are allowed

styles/native/ts/types/variables.d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,12 @@ export interface VariablesNavigation {
157157
activityIndicatorColor: string,
158158
backgroundColor: string,
159159
containerBackgroundColor: string,
160-
shadowColor: string,
161160
fontSize: number
161+
borderRadius: number,
162+
elevation: number,
163+
shadowColor: string,
164+
shadowOpacity: number,
165+
shadowRadius: number,
162166
}
163167
}
164168

0 commit comments

Comments
 (0)