@react-navigation/native-stack 7.0.0-alpha.5 → 7.0.0-alpha.7
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.
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/navigators/createNativeStackNavigator.js +21 -23
- package/lib/commonjs/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/useAnimatedHeaderHeight.js +19 -0
- package/lib/commonjs/utils/useAnimatedHeaderHeight.js.map +1 -0
- package/lib/commonjs/utils/useDismissedRouteError.js +3 -4
- package/lib/commonjs/utils/useDismissedRouteError.js.map +1 -1
- package/lib/commonjs/utils/useInvalidPreventRemoveError.js +4 -5
- package/lib/commonjs/utils/useInvalidPreventRemoveError.js.map +1 -1
- package/lib/commonjs/views/DebugContainer.js +2 -2
- package/lib/commonjs/views/DebugContainer.js.map +1 -1
- package/lib/commonjs/views/DebugContainer.native.js +3 -3
- package/lib/commonjs/views/DebugContainer.native.js.map +1 -1
- package/lib/commonjs/views/FontProcessor.js.map +1 -1
- package/lib/commonjs/views/FontProcessor.native.js +2 -4
- package/lib/commonjs/views/FontProcessor.native.js.map +1 -1
- package/lib/commonjs/views/HeaderConfig.js +6 -22
- package/lib/commonjs/views/HeaderConfig.js.map +1 -1
- package/lib/commonjs/views/NativeStackView.js +15 -10
- package/lib/commonjs/views/NativeStackView.js.map +1 -1
- package/lib/commonjs/views/NativeStackView.native.js +70 -28
- package/lib/commonjs/views/NativeStackView.native.js.map +1 -1
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigators/createNativeStackNavigator.js +18 -19
- package/lib/module/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/useAnimatedHeaderHeight.js +10 -0
- package/lib/module/utils/useAnimatedHeaderHeight.js.map +1 -0
- package/lib/module/utils/useDismissedRouteError.js +1 -2
- package/lib/module/utils/useDismissedRouteError.js.map +1 -1
- package/lib/module/utils/useInvalidPreventRemoveError.js +2 -3
- package/lib/module/utils/useInvalidPreventRemoveError.js.map +1 -1
- package/lib/module/views/DebugContainer.js.map +1 -1
- package/lib/module/views/DebugContainer.native.js +1 -1
- package/lib/module/views/DebugContainer.native.js.map +1 -1
- package/lib/module/views/FontProcessor.js.map +1 -1
- package/lib/module/views/FontProcessor.native.js +2 -4
- package/lib/module/views/FontProcessor.native.js.map +1 -1
- package/lib/module/views/HeaderConfig.js +4 -20
- package/lib/module/views/HeaderConfig.js.map +1 -1
- package/lib/module/views/NativeStackView.js +13 -8
- package/lib/module/views/NativeStackView.js.map +1 -1
- package/lib/module/views/NativeStackView.native.js +69 -27
- package/lib/module/views/NativeStackView.native.js.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigators/createNativeStackNavigator.d.ts +4 -3
- package/lib/typescript/src/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +8 -4
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/useAnimatedHeaderHeight.d.ts +5 -0
- package/lib/typescript/src/utils/useAnimatedHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/src/views/DebugContainer.d.ts +2 -2
- package/lib/typescript/src/views/DebugContainer.d.ts.map +1 -1
- package/lib/typescript/src/views/DebugContainer.native.d.ts +2 -2
- package/lib/typescript/src/views/DebugContainer.native.d.ts.map +1 -1
- package/lib/typescript/src/views/FontProcessor.native.d.ts.map +1 -1
- package/lib/typescript/src/views/HeaderConfig.d.ts +3 -2
- package/lib/typescript/src/views/HeaderConfig.d.ts.map +1 -1
- package/lib/typescript/src/views/NativeStackView.d.ts +3 -2
- package/lib/typescript/src/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/src/views/NativeStackView.native.d.ts +3 -2
- package/lib/typescript/src/views/NativeStackView.native.d.ts.map +1 -1
- package/package.json +15 -16
- package/src/index.tsx +5 -0
- package/src/navigators/createNativeStackNavigator.tsx +7 -5
- package/src/types.tsx +10 -6
- package/src/utils/useAnimatedHeaderHeight.tsx +18 -0
- package/src/views/DebugContainer.native.tsx +2 -2
- package/src/views/DebugContainer.tsx +1 -1
- package/src/views/FontProcessor.native.tsx +1 -2
- package/src/views/HeaderConfig.tsx +100 -125
- package/src/views/NativeStackView.native.tsx +159 -91
- package/src/views/NativeStackView.tsx +12 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/native-stack",
|
|
3
3
|
"description": "Native stack navigator using react-native-screens",
|
|
4
|
-
"version": "7.0.0-alpha.
|
|
4
|
+
"version": "7.0.0-alpha.7",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -41,27 +41,26 @@
|
|
|
41
41
|
"clean": "del lib"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@react-navigation/elements": "^2.0.0-alpha.
|
|
44
|
+
"@react-navigation/elements": "^2.0.0-alpha.4",
|
|
45
45
|
"warn-once": "^0.1.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@react-navigation/native": "^7.0.0-alpha.
|
|
49
|
-
"@testing-library/react-native": "^
|
|
50
|
-
"@types/react": "~18.
|
|
51
|
-
"
|
|
52
|
-
"del-cli": "^5.0.0",
|
|
48
|
+
"@react-navigation/native": "^7.0.0-alpha.6",
|
|
49
|
+
"@testing-library/react-native": "^12.3.1",
|
|
50
|
+
"@types/react": "~18.2.33",
|
|
51
|
+
"del-cli": "^5.1.0",
|
|
53
52
|
"react": "18.2.0",
|
|
54
|
-
"react-native": "0.
|
|
55
|
-
"react-native-builder-bob": "^0.
|
|
56
|
-
"react-native-screens": "~3.
|
|
57
|
-
"typescript": "^
|
|
53
|
+
"react-native": "0.72.6",
|
|
54
|
+
"react-native-builder-bob": "^0.23.1",
|
|
55
|
+
"react-native-screens": "~3.22.0",
|
|
56
|
+
"typescript": "^5.2.2"
|
|
58
57
|
},
|
|
59
58
|
"peerDependencies": {
|
|
60
|
-
"@react-navigation/native": "^
|
|
59
|
+
"@react-navigation/native": "^7.0.0-alpha.6",
|
|
61
60
|
"react": "*",
|
|
62
|
-
"react-native": "
|
|
63
|
-
"react-native-safe-area-context": "
|
|
64
|
-
"react-native-screens": "
|
|
61
|
+
"react-native": "0.72.6",
|
|
62
|
+
"react-native-safe-area-context": "4.6.3",
|
|
63
|
+
"react-native-screens": "~3.22.0"
|
|
65
64
|
},
|
|
66
65
|
"react-native-builder-bob": {
|
|
67
66
|
"source": "src",
|
|
@@ -77,5 +76,5 @@
|
|
|
77
76
|
]
|
|
78
77
|
]
|
|
79
78
|
},
|
|
80
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "d718b717320d41c90051c2a5f849b8d74f518a18"
|
|
81
80
|
}
|
package/src/index.tsx
CHANGED
|
@@ -8,6 +8,11 @@ export { createNativeStackNavigator } from './navigators/createNativeStackNaviga
|
|
|
8
8
|
*/
|
|
9
9
|
export { NativeStackView } from './views/NativeStackView';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Hooks
|
|
13
|
+
*/
|
|
14
|
+
export { useAnimatedHeaderHeight } from './utils/useAnimatedHeaderHeight';
|
|
15
|
+
|
|
11
16
|
/**
|
|
12
17
|
* Types
|
|
13
18
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createNavigatorFactory,
|
|
3
|
-
EventArg,
|
|
4
|
-
ParamListBase,
|
|
5
|
-
StackActionHelpers,
|
|
3
|
+
type EventArg,
|
|
4
|
+
type ParamListBase,
|
|
5
|
+
type StackActionHelpers,
|
|
6
6
|
StackActions,
|
|
7
|
-
StackNavigationState,
|
|
7
|
+
type StackNavigationState,
|
|
8
8
|
StackRouter,
|
|
9
|
-
StackRouterOptions,
|
|
9
|
+
type StackRouterOptions,
|
|
10
10
|
useNavigationBuilder,
|
|
11
11
|
} from '@react-navigation/native';
|
|
12
12
|
import * as React from 'react';
|
|
@@ -22,6 +22,7 @@ function NativeStackNavigator({
|
|
|
22
22
|
id,
|
|
23
23
|
initialRouteName,
|
|
24
24
|
children,
|
|
25
|
+
layout,
|
|
25
26
|
screenListeners,
|
|
26
27
|
screenOptions,
|
|
27
28
|
...rest
|
|
@@ -37,6 +38,7 @@ function NativeStackNavigator({
|
|
|
37
38
|
id,
|
|
38
39
|
initialRouteName,
|
|
39
40
|
children,
|
|
41
|
+
layout,
|
|
40
42
|
screenListeners,
|
|
41
43
|
screenOptions,
|
|
42
44
|
});
|
package/src/types.tsx
CHANGED
|
@@ -36,7 +36,7 @@ export type NativeStackNavigationEventMap = {
|
|
|
36
36
|
export type NativeStackNavigationProp<
|
|
37
37
|
ParamList extends ParamListBase,
|
|
38
38
|
RouteName extends keyof ParamList = string,
|
|
39
|
-
NavigatorID extends string | undefined = undefined
|
|
39
|
+
NavigatorID extends string | undefined = undefined,
|
|
40
40
|
> = NavigationProp<
|
|
41
41
|
ParamList,
|
|
42
42
|
RouteName,
|
|
@@ -50,7 +50,7 @@ export type NativeStackNavigationProp<
|
|
|
50
50
|
export type NativeStackScreenProps<
|
|
51
51
|
ParamList extends ParamListBase,
|
|
52
52
|
RouteName extends keyof ParamList = string,
|
|
53
|
-
NavigatorID extends string | undefined = undefined
|
|
53
|
+
NavigatorID extends string | undefined = undefined,
|
|
54
54
|
> = {
|
|
55
55
|
navigation: NativeStackNavigationProp<ParamList, RouteName, NavigatorID>;
|
|
56
56
|
route: RouteProp<ParamList, RouteName>;
|
|
@@ -72,7 +72,11 @@ export type NativeStackHeaderProps = {
|
|
|
72
72
|
/**
|
|
73
73
|
* Title of the previous screen.
|
|
74
74
|
*/
|
|
75
|
-
title: string;
|
|
75
|
+
title: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* The `href` to use for the anchor tag on web
|
|
78
|
+
*/
|
|
79
|
+
href: string | undefined;
|
|
76
80
|
};
|
|
77
81
|
/**
|
|
78
82
|
* Options for the current screen.
|
|
@@ -379,7 +383,7 @@ export type NativeStackNavigationOptions = {
|
|
|
379
383
|
statusBarTranslucent?: boolean;
|
|
380
384
|
/**
|
|
381
385
|
* Sets the direction in which you should swipe to dismiss the screen.
|
|
382
|
-
* When using `vertical` option, options `fullScreenGestureEnabled: true`, `
|
|
386
|
+
* When using `vertical` option, options `fullScreenGestureEnabled: true`, `animationMatchesGesture: true` and `animation: 'slide_from_bottom'` are set by default.
|
|
383
387
|
*
|
|
384
388
|
* Supported values:
|
|
385
389
|
* - `vertical` – dismiss screen vertically
|
|
@@ -399,10 +403,10 @@ export type NativeStackNavigationOptions = {
|
|
|
399
403
|
*
|
|
400
404
|
* @platform ios
|
|
401
405
|
*/
|
|
402
|
-
|
|
406
|
+
animationMatchesGesture?: boolean;
|
|
403
407
|
/**
|
|
404
408
|
* Whether the gesture to dismiss should work on the whole screen. Using gesture to dismiss with this option results in the same
|
|
405
|
-
* transition animation as `simple_push`. This behavior can be changed by setting `
|
|
409
|
+
* transition animation as `simple_push`. This behavior can be changed by setting `animationMatchesGesture` prop. Achieving the
|
|
406
410
|
* default iOS animation isn't possible due to platform limitations. Defaults to `false`.
|
|
407
411
|
*
|
|
408
412
|
* Doesn't affect the behavior of screens presented modally.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Animated } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export const AnimatedHeaderHeightContext = React.createContext<
|
|
5
|
+
Animated.Value | undefined
|
|
6
|
+
>(undefined);
|
|
7
|
+
|
|
8
|
+
export function useAnimatedHeaderHeight() {
|
|
9
|
+
const animatedValue = React.useContext(AnimatedHeaderHeightContext);
|
|
10
|
+
|
|
11
|
+
if (animatedValue === undefined) {
|
|
12
|
+
throw new Error(
|
|
13
|
+
"Couldn't find the header height. Are you inside a screen in a native stack navigator?"
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return animatedValue;
|
|
18
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Platform, View, ViewProps } from 'react-native';
|
|
3
|
-
// @ts-
|
|
2
|
+
import { Platform, View, type ViewProps } from 'react-native';
|
|
3
|
+
// @ts-expect-error Getting private component
|
|
4
4
|
import AppContainer from 'react-native/Libraries/ReactNative/AppContainer';
|
|
5
5
|
import type { StackPresentationTypes } from 'react-native-screens';
|
|
6
6
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
// @ts-
|
|
1
|
+
// @ts-expect-error importing private module
|
|
2
2
|
import ReactNativeStyleAttributes from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes';
|
|
3
3
|
|
|
4
4
|
export function processFonts(
|
|
5
5
|
fontFamilies: (string | undefined)[]
|
|
6
6
|
): (string | undefined)[] {
|
|
7
|
-
// @ts-ignore: React Native types are incorrect here and don't consider fontFamily a style value
|
|
8
7
|
const fontFamilyProcessor = ReactNativeStyleAttributes.fontFamily?.process;
|
|
9
8
|
if (typeof fontFamilyProcessor === 'function') {
|
|
10
9
|
return fontFamilies.map(fontFamilyProcessor);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getHeaderTitle, HeaderTitle } from '@react-navigation/elements';
|
|
2
|
-
import { Route, useLocale, useTheme } from '@react-navigation/native';
|
|
2
|
+
import { type Route, useLocale, useTheme } from '@react-navigation/native';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { Platform, StyleSheet, TextStyle, View } from 'react-native';
|
|
4
|
+
import { Platform, StyleSheet, type TextStyle, View } from 'react-native';
|
|
5
5
|
import {
|
|
6
6
|
isSearchBarAvailableForCurrentPlatform,
|
|
7
7
|
ScreenStackHeaderBackButtonImage,
|
|
@@ -24,7 +24,6 @@ type Props = NativeStackNavigationOptions & {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export function HeaderConfig({
|
|
27
|
-
headerHeight,
|
|
28
27
|
headerBackImageSource,
|
|
29
28
|
headerBackButtonMenuEnabled,
|
|
30
29
|
headerBackTitle,
|
|
@@ -177,118 +176,105 @@ export function HeaderConfig({
|
|
|
177
176
|
headerTransparent !== false);
|
|
178
177
|
|
|
179
178
|
return (
|
|
180
|
-
|
|
181
|
-
{
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
179
|
+
<ScreenStackHeaderConfig
|
|
180
|
+
backButtonInCustomView={backButtonInCustomView}
|
|
181
|
+
backgroundColor={headerBackgroundColor}
|
|
182
|
+
backTitle={headerBackTitleVisible ? headerBackTitle : ' '}
|
|
183
|
+
backTitleFontFamily={backTitleFontFamily}
|
|
184
|
+
backTitleFontSize={backTitleFontSize}
|
|
185
|
+
blurEffect={headerBlurEffect}
|
|
186
|
+
color={tintColor}
|
|
187
|
+
direction={direction}
|
|
188
|
+
disableBackButtonMenu={headerBackButtonMenuEnabled === false}
|
|
189
|
+
hidden={headerShown === false}
|
|
190
|
+
hideBackButton={headerBackVisible === false}
|
|
191
|
+
hideShadow={
|
|
192
|
+
headerShadowVisible === false ||
|
|
193
|
+
headerBackground != null ||
|
|
194
|
+
(headerTransparent && headerShadowVisible !== true)
|
|
195
|
+
}
|
|
196
|
+
largeTitle={headerLargeTitle}
|
|
197
|
+
largeTitleBackgroundColor={largeTitleBackgroundColor}
|
|
198
|
+
largeTitleColor={largeTitleColor}
|
|
199
|
+
largeTitleFontFamily={largeTitleFontFamily}
|
|
200
|
+
largeTitleFontSize={largeTitleFontSize}
|
|
201
|
+
largeTitleFontWeight={largeTitleFontWeight}
|
|
202
|
+
largeTitleHideShadow={headerLargeTitleShadowVisible === false}
|
|
203
|
+
title={titleText}
|
|
204
|
+
titleColor={titleColor}
|
|
205
|
+
titleFontFamily={titleFontFamily}
|
|
206
|
+
titleFontSize={titleFontSize}
|
|
207
|
+
titleFontWeight={titleFontWeight}
|
|
208
|
+
topInsetEnabled={headerTopInsetEnabled}
|
|
209
|
+
translucent={
|
|
210
|
+
// This defaults to `true`, so we can't pass `undefined`
|
|
211
|
+
translucent === true
|
|
212
|
+
}
|
|
213
|
+
>
|
|
214
|
+
{Platform.OS === 'ios' ? (
|
|
215
|
+
<>
|
|
216
|
+
{headerLeftElement != null ? (
|
|
217
|
+
<ScreenStackHeaderLeftView>
|
|
218
|
+
{headerLeftElement}
|
|
219
|
+
</ScreenStackHeaderLeftView>
|
|
220
|
+
) : null}
|
|
221
|
+
{headerTitleElement != null ? (
|
|
222
|
+
<ScreenStackHeaderCenterView>
|
|
223
|
+
{headerTitleElement}
|
|
224
|
+
</ScreenStackHeaderCenterView>
|
|
225
|
+
) : null}
|
|
226
|
+
</>
|
|
227
|
+
) : (
|
|
228
|
+
<>
|
|
229
|
+
{headerLeftElement != null || typeof headerTitle === 'function' ? (
|
|
230
|
+
<ScreenStackHeaderLeftView>
|
|
231
|
+
<View style={styles.row}>
|
|
231
232
|
{headerLeftElement}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
{headerBackImageSource !== undefined ? (
|
|
278
|
-
<ScreenStackHeaderBackButtonImage source={headerBackImageSource} />
|
|
279
|
-
) : null}
|
|
280
|
-
{headerRightElement != null ? (
|
|
281
|
-
<ScreenStackHeaderRightView>
|
|
282
|
-
{headerRightElement}
|
|
283
|
-
</ScreenStackHeaderRightView>
|
|
284
|
-
) : null}
|
|
285
|
-
{hasHeaderSearchBar ? (
|
|
286
|
-
<ScreenStackHeaderSearchBarView>
|
|
287
|
-
<SearchBar {...headerSearchBarOptions} />
|
|
288
|
-
</ScreenStackHeaderSearchBarView>
|
|
289
|
-
) : null}
|
|
290
|
-
</ScreenStackHeaderConfig>
|
|
291
|
-
</>
|
|
233
|
+
{headerTitleAlign !== 'center' ? (
|
|
234
|
+
typeof headerTitle === 'function' ? (
|
|
235
|
+
headerTitleElement
|
|
236
|
+
) : (
|
|
237
|
+
<HeaderTitle
|
|
238
|
+
tintColor={tintColor}
|
|
239
|
+
style={headerTitleStyleSupported}
|
|
240
|
+
>
|
|
241
|
+
{titleText}
|
|
242
|
+
</HeaderTitle>
|
|
243
|
+
)
|
|
244
|
+
) : null}
|
|
245
|
+
</View>
|
|
246
|
+
</ScreenStackHeaderLeftView>
|
|
247
|
+
) : null}
|
|
248
|
+
{headerTitleAlign === 'center' ? (
|
|
249
|
+
<ScreenStackHeaderCenterView>
|
|
250
|
+
{typeof headerTitle === 'function' ? (
|
|
251
|
+
headerTitleElement
|
|
252
|
+
) : (
|
|
253
|
+
<HeaderTitle
|
|
254
|
+
tintColor={tintColor}
|
|
255
|
+
style={headerTitleStyleSupported}
|
|
256
|
+
>
|
|
257
|
+
{titleText}
|
|
258
|
+
</HeaderTitle>
|
|
259
|
+
)}
|
|
260
|
+
</ScreenStackHeaderCenterView>
|
|
261
|
+
) : null}
|
|
262
|
+
</>
|
|
263
|
+
)}
|
|
264
|
+
{headerBackImageSource !== undefined ? (
|
|
265
|
+
<ScreenStackHeaderBackButtonImage source={headerBackImageSource} />
|
|
266
|
+
) : null}
|
|
267
|
+
{headerRightElement != null ? (
|
|
268
|
+
<ScreenStackHeaderRightView>
|
|
269
|
+
{headerRightElement}
|
|
270
|
+
</ScreenStackHeaderRightView>
|
|
271
|
+
) : null}
|
|
272
|
+
{hasHeaderSearchBar ? (
|
|
273
|
+
<ScreenStackHeaderSearchBarView>
|
|
274
|
+
<SearchBar {...headerSearchBarOptions} />
|
|
275
|
+
</ScreenStackHeaderSearchBarView>
|
|
276
|
+
) : null}
|
|
277
|
+
</ScreenStackHeaderConfig>
|
|
292
278
|
);
|
|
293
279
|
}
|
|
294
280
|
|
|
@@ -297,15 +283,4 @@ const styles = StyleSheet.create({
|
|
|
297
283
|
flexDirection: 'row',
|
|
298
284
|
alignItems: 'center',
|
|
299
285
|
},
|
|
300
|
-
translucent: {
|
|
301
|
-
position: 'absolute',
|
|
302
|
-
top: 0,
|
|
303
|
-
left: 0,
|
|
304
|
-
right: 0,
|
|
305
|
-
zIndex: 1,
|
|
306
|
-
elevation: 1,
|
|
307
|
-
},
|
|
308
|
-
background: {
|
|
309
|
-
overflow: 'hidden',
|
|
310
|
-
},
|
|
311
286
|
});
|