@complexify/expo-mapbox-navigation 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,13 +48,15 @@ export type ExpoMapboxNavigationViewProps = {
48
48
  bottomBannerArrivalTimeTextColor?: string;
49
49
  resumeButtonBackgroundColor?: string;
50
50
  resumeButtonTextColor?: string;
51
+ resumeButtonBorderColor?: string;
51
52
  speedLimitBackgroundColor?: string;
52
53
  speedLimitTextColor?: string;
53
54
  speedLimitBorderColor?: string;
54
55
  floatingStackBackgroundColor?: string;
55
56
  floatingButtonsBackgroundColor?: string;
57
+ floatingButtonsTextColor?: string;
58
+ floatingButtonsBorderColor?: string;
56
59
  wayNameViewBackgroundColor?: string;
57
- wayNameViewTextColor?: string;
58
60
  };
59
61
  export {};
60
62
  //# sourceMappingURL=ExpoMapboxNavigation.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoMapboxNavigation.types.d.ts","sourceRoot":"","sources":["../src/ExpoMapboxNavigation.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,KAAK,aAAa,GAAG;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,WAAW,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5D,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,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qBAAqB,CAAC,EAAE,MAAM,CAAC;IAG/B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,0BAA0B,CAAC,EAAE,MAAM,CAAC;IAGpC,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoMapboxNavigation.types.js","sourceRoot":"","sources":["../src/ExpoMapboxNavigation.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ViewStyle, StyleProp } from \"react-native\";\n\ntype ProgressEvent = {\n distanceRemaining: number;\n distanceTraveled: number;\n durationRemaining: number;\n fractionTraveled: number;\n};\n\nexport type ExpoMapboxNavigationViewProps = {\n coordinates: Array<{ latitude: number; longitude: number }>;\n waypointIndices?: number[];\n useRouteMatchingApi?: boolean;\n locale?: string;\n routeProfile?: string;\n routeExcludeList?: string[];\n mapStyle?: string;\n mute?: boolean;\n routeColor?: string;\n routeAlternateColor?: string;\n routeCasingColor?: string;\n routeAlternateCasingColor?: string;\n traversedRouteColor?: string;\n maneuverArrowColor?: string;\n onRouteProgressChanged?: (event: { nativeEvent: ProgressEvent }) => void;\n onCancelNavigation?: () => void;\n onWaypointArrival?: (event: {\n nativeEvent: ProgressEvent | undefined;\n }) => void;\n onFinalDestinationArrival?: () => void;\n onRouteChanged?: () => void;\n onUserOffRoute?: () => void;\n onRoutesLoaded?: () => void;\n style?: StyleProp<ViewStyle>;\n\n // Top Banner (1)\n topBannerBackgroundColor?: string;\n topBannerPrimaryTextColor?: string;\n topBannerSecondaryTextColor?: string;\n topBannerDistanceTextColor?: string;\n topBannerSeparatorColor?: string;\n\n // Information Stack (2)\n informationStackBackgroundColor?: string;\n informationStackTextColor?: string;\n\n // Bottom Banner (3)\n bottomBannerBackgroundColor?: string;\n bottomBannerTimeRemainingTextColor?: string;\n bottomBannerDistanceRemainingTextColor?: string;\n bottomBannerArrivalTimeTextColor?: string;\n\n // Resume Button (4)\n resumeButtonBackgroundColor?: string;\n resumeButtonTextColor?: string;\n\n // Speed Limit View (5)\n speedLimitBackgroundColor?: string;\n speedLimitTextColor?: string;\n speedLimitBorderColor?: string;\n\n // Floating Stack (6)\n floatingStackBackgroundColor?: string;\n floatingButtonsBackgroundColor?: string;\n\n // Way Name Label (8)\n wayNameViewBackgroundColor?: string;\n wayNameViewTextColor?: string;\n};\n"]}
1
+ {"version":3,"file":"ExpoMapboxNavigation.types.js","sourceRoot":"","sources":["../src/ExpoMapboxNavigation.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ViewStyle, StyleProp } from \"react-native\";\n\ntype ProgressEvent = {\n distanceRemaining: number;\n distanceTraveled: number;\n durationRemaining: number;\n fractionTraveled: number;\n};\n\nexport type ExpoMapboxNavigationViewProps = {\n coordinates: Array<{ latitude: number; longitude: number }>;\n waypointIndices?: number[];\n useRouteMatchingApi?: boolean;\n locale?: string;\n routeProfile?: string;\n routeExcludeList?: string[];\n mapStyle?: string;\n mute?: boolean;\n routeColor?: string;\n routeAlternateColor?: string;\n routeCasingColor?: string;\n routeAlternateCasingColor?: string;\n traversedRouteColor?: string;\n maneuverArrowColor?: string;\n onRouteProgressChanged?: (event: { nativeEvent: ProgressEvent }) => void;\n onCancelNavigation?: () => void;\n onWaypointArrival?: (event: {\n nativeEvent: ProgressEvent | undefined;\n }) => void;\n onFinalDestinationArrival?: () => void;\n onRouteChanged?: () => void;\n onUserOffRoute?: () => void;\n onRoutesLoaded?: () => void;\n style?: StyleProp<ViewStyle>;\n\n // Top Banner (1)\n topBannerBackgroundColor?: string;\n topBannerPrimaryTextColor?: string;\n topBannerSecondaryTextColor?: string;\n topBannerDistanceTextColor?: string;\n topBannerSeparatorColor?: string;\n\n // Information Stack (2)\n informationStackBackgroundColor?: string;\n informationStackTextColor?: string;\n\n // Bottom Banner (3)\n bottomBannerBackgroundColor?: string;\n bottomBannerTimeRemainingTextColor?: string;\n bottomBannerDistanceRemainingTextColor?: string;\n bottomBannerArrivalTimeTextColor?: string;\n\n // Resume Button (4)\n resumeButtonBackgroundColor?: string;\n resumeButtonTextColor?: string;\n resumeButtonBorderColor?: string;\n\n // Speed Limit View (5)\n speedLimitBackgroundColor?: string;\n speedLimitTextColor?: string;\n speedLimitBorderColor?: string;\n\n // Floating Stack (6)\n floatingStackBackgroundColor?: string;\n floatingButtonsBackgroundColor?: string;\n floatingButtonsTextColor?: string;\n floatingButtonsBorderColor?: string;\n\n // Way Name Label (8)\n wayNameViewBackgroundColor?: string;\n};\n"]}
@@ -8,8 +8,20 @@ class CustomDayStyle: StandardDayStyle {
8
8
  var customSpeedLimitBackgroundColor: UIColor?
9
9
  var customSpeedLimitBorderColor: UIColor?
10
10
  var customBottomBannerBackgroundColor: UIColor?
11
- var customWayNameTextColor: UIColor?
11
+ var customBottomBannerTimeRemainingTextColor: UIColor?
12
+ var customBottomBannerDistanceRemainingTextColor: UIColor?
13
+ var customBottomBannerArrivalTimeTextColor: UIColor?
12
14
  var customWayNameBackgroundColor: UIColor?
15
+ var customTopBannerBackgroundColor: UIColor?
16
+ var customTopBannerPrimaryTextColor: UIColor?
17
+ var customTopBannerSecondaryTextColor: UIColor?
18
+ var customTopBannerDistanceTextColor: UIColor?
19
+ var customResumeButtonBackgroundColor: UIColor?
20
+ var customResumeButtonTextColor: UIColor?
21
+ var customResumeButtonBorderColor: UIColor?
22
+ var customFloatingButtonsBackgroundColor: UIColor?
23
+ var customFloatingButtonsBorderColor: UIColor?
24
+ var customFloatingButtonsTextColor: UIColor?
13
25
 
14
26
  required init() {
15
27
  super.init()
@@ -37,12 +49,79 @@ class CustomDayStyle: StandardDayStyle {
37
49
  BottomBannerView.appearance(for: traitCollection).backgroundColor = bottomBannerBg
38
50
  }
39
51
 
40
- // Way name customization
41
- if let textColor = customWayNameTextColor {
42
- WayNameView.appearance(for: traitCollection).textColor = textColor
52
+ // Bottom banner text colors
53
+ if let timeRemainingColor = customBottomBannerTimeRemainingTextColor {
54
+ TimeRemainingLabel.appearance(for: traitCollection).textColor = timeRemainingColor
55
+ }
56
+ if let distanceRemainingColor = customBottomBannerDistanceRemainingTextColor {
57
+ DistanceRemainingLabel.appearance(for: traitCollection).textColor = distanceRemainingColor
58
+ }
59
+ if let arrivalTimeColor = customBottomBannerArrivalTimeTextColor {
60
+ ArrivalTimeLabel.appearance(for: traitCollection).textColor = arrivalTimeColor
43
61
  }
62
+
63
+ // Way name customization
44
64
  if let bgColor = customWayNameBackgroundColor {
45
65
  WayNameView.appearance(for: traitCollection).backgroundColor = bgColor.withAlphaComponent(0.8)
46
66
  }
67
+
68
+ // Top banner customization
69
+ if let topBannerBg = customTopBannerBackgroundColor {
70
+ InstructionsBannerView.appearance(for: traitCollection).backgroundColor = topBannerBg
71
+ }
72
+ if let primaryTextColor = customTopBannerPrimaryTextColor {
73
+ PrimaryLabel.appearance(for: traitCollection).textColor = primaryTextColor
74
+ }
75
+ if let secondaryTextColor = customTopBannerSecondaryTextColor {
76
+ SecondaryLabel.appearance(for: traitCollection).textColor = secondaryTextColor
77
+ }
78
+ if let distanceTextColor = customTopBannerDistanceTextColor {
79
+ DistanceLabel.appearance(for: traitCollection).textColor = distanceTextColor
80
+ }
81
+
82
+ // Resume button customization
83
+ if let resumeBgColor = customResumeButtonBackgroundColor {
84
+ ResumeButton.appearance(for: traitCollection).backgroundColor = resumeBgColor
85
+ }
86
+ if let resumeTextColor = customResumeButtonTextColor {
87
+ ResumeButton.appearance(for: traitCollection).tintColor = resumeTextColor
88
+ }
89
+ if let resumeBorderColor = customResumeButtonBorderColor {
90
+ ResumeButton.appearance(for: traitCollection).borderColor = resumeBorderColor
91
+ }
92
+
93
+ // Set default values for border width and corner radius
94
+ ResumeButton.appearance(for: traitCollection).borderWidth = 1.0
95
+ ResumeButton.appearance(for: traitCollection).cornerRadius = 4.0
96
+
97
+ // Floating buttons customization
98
+ if let floatingBgColor = customFloatingButtonsBackgroundColor {
99
+ FloatingButton.appearance(for: traitCollection).backgroundColor = floatingBgColor
100
+ OverviewButton.appearance(for: traitCollection).backgroundColor = floatingBgColor
101
+ MuteButton.appearance(for: traitCollection).backgroundColor = floatingBgColor
102
+ FeedbackButton.appearance(for: traitCollection).backgroundColor = floatingBgColor
103
+ }
104
+ if let floatingTextColor = customFloatingButtonsTextColor {
105
+ FloatingButton.appearance(for: traitCollection).tintColor = floatingTextColor
106
+ OverviewButton.appearance(for: traitCollection).tintColor = floatingTextColor
107
+ MuteButton.appearance(for: traitCollection).tintColor = floatingTextColor
108
+ FeedbackButton.appearance(for: traitCollection).tintColor = floatingTextColor
109
+ }
110
+ if let floatingBorderColor = customFloatingButtonsBorderColor {
111
+ FloatingButton.appearance(for: traitCollection).borderColor = floatingBorderColor
112
+ OverviewButton.appearance(for: traitCollection).borderColor = floatingBorderColor
113
+ MuteButton.appearance(for: traitCollection).borderColor = floatingBorderColor
114
+ FeedbackButton.appearance(for: traitCollection).borderColor = floatingBorderColor
115
+ }
116
+
117
+ // Set default values for floating buttons
118
+ FloatingButton.appearance(for: traitCollection).borderWidth = 1.0
119
+ FloatingButton.appearance(for: traitCollection).cornerRadius = 4.0
120
+ OverviewButton.appearance(for: traitCollection).borderWidth = 1.0
121
+ OverviewButton.appearance(for: traitCollection).cornerRadius = 4.0
122
+ MuteButton.appearance(for: traitCollection).borderWidth = 1.0
123
+ MuteButton.appearance(for: traitCollection).cornerRadius = 4.0
124
+ FeedbackButton.appearance(for: traitCollection).borderWidth = 1.0
125
+ FeedbackButton.appearance(for: traitCollection).cornerRadius = 4.0
47
126
  }
48
127
  }
@@ -162,6 +162,18 @@ public class ExpoMapboxNavigationModule: Module {
162
162
  }
163
163
  }
164
164
 
165
+ Prop("floatingButtonsTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
166
+ if let hexColor = color {
167
+ view.controller.setFloatingButtonsTextColor(hexColor: hexColor)
168
+ }
169
+ }
170
+
171
+ Prop("floatingButtonsBorderColor") { (view: ExpoMapboxNavigationView, color: String?) in
172
+ if let hexColor = color {
173
+ view.controller.setFloatingButtonsBorderColor(hexColor: hexColor)
174
+ }
175
+ }
176
+
165
177
  Prop("speedLimitBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
166
178
  if let hexColor = color {
167
179
  view.controller.setSpeedLimitBackgroundColor(hexColor: hexColor)
@@ -180,12 +192,6 @@ public class ExpoMapboxNavigationModule: Module {
180
192
  }
181
193
  }
182
194
 
183
- Prop("wayNameViewTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
184
- if let hexColor = color {
185
- view.controller.setWayNameViewTextColor(hexColor: hexColor)
186
- }
187
- }
188
-
189
195
  Prop("resumeButtonBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
190
196
  if let hexColor = color {
191
197
  view.controller.setResumeButtonBackgroundColor(hexColor: hexColor)
@@ -17,8 +17,6 @@ class ExpoMapboxNavigationView: ExpoView {
17
17
 
18
18
  let controller = ExpoMapboxNavigationViewController()
19
19
 
20
- let customDayStyle = CustomDayStyle()
21
-
22
20
  required init(appContext: AppContext? = nil) {
23
21
  super.init(appContext: appContext)
24
22
  clipsToBounds = true
@@ -93,10 +91,11 @@ class ExpoMapboxNavigationViewController: UIViewController {
93
91
  var currentSpeedLimitBackgroundColor: UIColor?
94
92
  var currentSpeedLimitTextColor: UIColor?
95
93
  var currentWayNameViewBackgroundColor: UIColor?
96
- var currentWayNameViewTextColor: UIColor?
97
94
  var currentResumeButtonBackgroundColor: UIColor?
98
95
  var currentResumeButtonTextColor: UIColor?
99
96
 
97
+ let customDayStyle = CustomDayStyle()
98
+
100
99
  init() {
101
100
  super.init(nibName: nil, bundle: nil)
102
101
  mapboxNavigation = ExpoMapboxNavigationViewController.navigationProvider.mapboxNavigation
@@ -237,19 +236,23 @@ class ExpoMapboxNavigationViewController: UIViewController {
237
236
  }
238
237
 
239
238
  func setTopBannerBackgroundColor(hexColor: String) {
240
- currentTopBannerBackgroundColor = UIColor(hex: hexColor)
239
+ customDayStyle.customTopBannerBackgroundColor = UIColor(hex: hexColor)
240
+ update()
241
241
  }
242
242
 
243
243
  func setTopBannerPrimaryTextColor(hexColor: String) {
244
- currentTopBannerPrimaryTextColor = UIColor(hex: hexColor)
244
+ customDayStyle.customTopBannerPrimaryTextColor = UIColor(hex: hexColor)
245
+ update()
245
246
  }
246
247
 
247
248
  func setTopBannerSecondaryTextColor(hexColor: String) {
248
- currentTopBannerSecondaryTextColor = UIColor(hex: hexColor)
249
+ customDayStyle.customTopBannerSecondaryTextColor = UIColor(hex: hexColor)
250
+ update()
249
251
  }
250
252
 
251
253
  func setTopBannerDistanceTextColor(hexColor: String) {
252
- currentTopBannerDistanceTextColor = UIColor(hex: hexColor)
254
+ customDayStyle.customTopBannerDistanceTextColor = UIColor(hex: hexColor)
255
+ update()
253
256
  }
254
257
 
255
258
  func setTopBannerSeparatorColor(hexColor: String) {
@@ -262,17 +265,17 @@ class ExpoMapboxNavigationViewController: UIViewController {
262
265
  }
263
266
 
264
267
  func setBottomBannerTimeRemainingTextColor(hexColor: String) {
265
- currentBottomBannerTimeRemainingTextColor = UIColor(hex: hexColor)
268
+ customDayStyle.customBottomBannerTimeRemainingTextColor = UIColor(hex: hexColor)
266
269
  update()
267
270
  }
268
271
 
269
272
  func setBottomBannerDistanceRemainingTextColor(hexColor: String) {
270
- currentBottomBannerDistanceRemainingTextColor = UIColor(hex: hexColor)
273
+ customDayStyle.customBottomBannerDistanceRemainingTextColor = UIColor(hex: hexColor)
271
274
  update()
272
275
  }
273
276
 
274
277
  func setBottomBannerArrivalTimeTextColor(hexColor: String) {
275
- currentBottomBannerArrivalTimeTextColor = UIColor(hex: hexColor)
278
+ customDayStyle.customBottomBannerArrivalTimeTextColor = UIColor(hex: hexColor)
276
279
  update()
277
280
  }
278
281
 
@@ -292,7 +295,17 @@ class ExpoMapboxNavigationViewController: UIViewController {
292
295
  }
293
296
 
294
297
  func setFloatingButtonsBackgroundColor(hexColor: String) {
295
- currentFloatingButtonsBackgroundColor = UIColor(hex: hexColor)
298
+ customDayStyle.customFloatingButtonsBackgroundColor = UIColor(hex: hexColor)
299
+ update()
300
+ }
301
+
302
+ func setFloatingButtonsTextColor(hexColor: String) {
303
+ customDayStyle.customFloatingButtonsTextColor = UIColor(hex: hexColor)
304
+ update()
305
+ }
306
+
307
+ func setFloatingButtonsBorderColor(hexColor: String) {
308
+ customDayStyle.customFloatingButtonsBorderColor = UIColor(hex: hexColor)
296
309
  update()
297
310
  }
298
311
 
@@ -311,18 +324,18 @@ class ExpoMapboxNavigationViewController: UIViewController {
311
324
  update()
312
325
  }
313
326
 
314
- func setWayNameViewTextColor(hexColor: String) {
315
- customDayStyle.customWayNameTextColor = UIColor(hex: hexColor)
327
+ func setResumeButtonBackgroundColor(hexColor: String) {
328
+ customDayStyle.customResumeButtonBackgroundColor = UIColor(hex: hexColor)
316
329
  update()
317
330
  }
318
331
 
319
- func setResumeButtonBackgroundColor(hexColor: String) {
320
- currentResumeButtonBackgroundColor = UIColor(hex: hexColor)
332
+ func setResumeButtonTextColor(hexColor: String) {
333
+ customDayStyle.customResumeButtonTextColor = UIColor(hex: hexColor)
321
334
  update()
322
335
  }
323
336
 
324
- func setResumeButtonTextColor(hexColor: String) {
325
- currentResumeButtonTextColor = UIColor(hex: hexColor)
337
+ func setResumeButtonBorderColor(hexColor: String) {
338
+ customDayStyle.customResumeButtonBorderColor = UIColor(hex: hexColor)
326
339
  update()
327
340
  }
328
341
 
@@ -400,46 +413,15 @@ class ExpoMapboxNavigationViewController: UIViewController {
400
413
  let topBanner = TopBannerViewController()
401
414
  topBanner.instructionsBannerView.distanceFormatter.locale = currentLocale
402
415
 
403
- // Apply top banner colors
404
- if let backgroundColor = currentTopBannerBackgroundColor {
405
- topBanner.view.backgroundColor = backgroundColor
406
- }
407
- if let primaryTextColor = currentTopBannerPrimaryTextColor {
408
- topBanner.instructionsBannerView.primaryLabel.textColor = primaryTextColor
409
- }
410
- if let secondaryTextColor = currentTopBannerSecondaryTextColor {
411
- topBanner.instructionsBannerView.secondaryLabel.textColor = secondaryTextColor
412
- }
413
- if let distanceTextColor = currentTopBannerDistanceTextColor {
414
- topBanner.instructionsBannerView.distanceLabel.textColor = distanceTextColor
415
- }
416
- if let separatorColor = currentTopBannerSeparatorColor {
417
- topBanner.instructionsBannerView.separatorView.backgroundColor = separatorColor
418
- }
419
-
420
416
  let bottomBanner = BottomBannerViewController()
421
417
  bottomBanner.distanceFormatter.locale = currentLocale
422
418
  bottomBanner.dateFormatter.locale = currentLocale
423
419
 
424
- // Apply bottom banner colors
425
- if let backgroundColor = currentBottomBannerBackgroundColor {
426
- bottomBanner.view.backgroundColor = backgroundColor
427
- }
428
- if let timeRemainingColor = currentBottomBannerTimeRemainingTextColor {
429
- bottomBanner.timeRemainingLabel.textColor = timeRemainingColor
430
- }
431
- if let distanceRemainingColor = currentBottomBannerDistanceRemainingTextColor {
432
- bottomBanner.distanceRemainingLabel.textColor = distanceRemainingColor
433
- }
434
- if let arrivalTimeColor = currentBottomBannerArrivalTimeTextColor {
435
- bottomBanner.arrivalTimeLabel.textColor = arrivalTimeColor
436
- }
437
-
438
420
  let navigationOptions = NavigationOptions(
439
- styles: [customDayStyle],
440
421
  mapboxNavigation: self.mapboxNavigation!,
441
422
  voiceController: ExpoMapboxNavigationViewController.navigationProvider.routeVoiceController,
442
423
  eventsManager: ExpoMapboxNavigationViewController.navigationProvider.eventsManager(),
424
+ styles: [customDayStyle],
443
425
  topBanner: topBanner,
444
426
  bottomBanner: bottomBanner
445
427
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@complexify/expo-mapbox-navigation",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Expo module for Mapbox's Navigation SDK",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -53,6 +53,7 @@ export type ExpoMapboxNavigationViewProps = {
53
53
  // Resume Button (4)
54
54
  resumeButtonBackgroundColor?: string;
55
55
  resumeButtonTextColor?: string;
56
+ resumeButtonBorderColor?: string;
56
57
 
57
58
  // Speed Limit View (5)
58
59
  speedLimitBackgroundColor?: string;
@@ -62,8 +63,9 @@ export type ExpoMapboxNavigationViewProps = {
62
63
  // Floating Stack (6)
63
64
  floatingStackBackgroundColor?: string;
64
65
  floatingButtonsBackgroundColor?: string;
66
+ floatingButtonsTextColor?: string;
67
+ floatingButtonsBorderColor?: string;
65
68
 
66
69
  // Way Name Label (8)
67
70
  wayNameViewBackgroundColor?: string;
68
- wayNameViewTextColor?: string;
69
71
  };