@react-navigation/native-stack 6.6.0 → 6.7.0
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/views/HeaderConfig.js +5 -2
- package/lib/commonjs/views/HeaderConfig.js.map +1 -1
- package/lib/commonjs/views/NativeStackView.js +7 -9
- package/lib/commonjs/views/NativeStackView.js.map +1 -1
- package/lib/commonjs/views/NativeStackView.native.js +49 -7
- package/lib/commonjs/views/NativeStackView.native.js.map +1 -1
- package/lib/module/views/HeaderConfig.js +6 -3
- package/lib/module/views/HeaderConfig.js.map +1 -1
- package/lib/module/views/NativeStackView.js +7 -9
- package/lib/module/views/NativeStackView.js.map +1 -1
- package/lib/module/views/NativeStackView.native.js +49 -7
- package/lib/module/views/NativeStackView.native.js.map +1 -1
- package/lib/typescript/src/types.d.ts +48 -0
- package/package.json +10 -11
- package/src/types.tsx +48 -0
- package/src/views/HeaderConfig.tsx +7 -4
- package/src/views/NativeStackView.native.tsx +49 -5
- package/src/views/NativeStackView.tsx +7 -14
|
@@ -42,7 +42,7 @@ export default function NativeStackView({ state, descriptors }: Props) {
|
|
|
42
42
|
const previousDescriptor = previousKey
|
|
43
43
|
? descriptors[previousKey]
|
|
44
44
|
: undefined;
|
|
45
|
-
const
|
|
45
|
+
const nextDescriptor = nextKey ? descriptors[nextKey] : undefined;
|
|
46
46
|
const { options, navigation, render } = descriptors[route.key];
|
|
47
47
|
|
|
48
48
|
const {
|
|
@@ -58,12 +58,13 @@ export default function NativeStackView({ state, descriptors }: Props) {
|
|
|
58
58
|
headerStyle,
|
|
59
59
|
headerShadowVisible,
|
|
60
60
|
headerTransparent,
|
|
61
|
+
headerBackground,
|
|
61
62
|
headerBackTitle,
|
|
62
63
|
presentation,
|
|
63
64
|
contentStyle,
|
|
64
65
|
} = options;
|
|
65
66
|
|
|
66
|
-
const nextPresentation =
|
|
67
|
+
const nextPresentation = nextDescriptor?.options.presentation;
|
|
67
68
|
|
|
68
69
|
return (
|
|
69
70
|
<Screen
|
|
@@ -137,18 +138,10 @@ export default function NativeStackView({ state, descriptors }: Props) {
|
|
|
137
138
|
}
|
|
138
139
|
headerTitleAlign={headerTitleAlign}
|
|
139
140
|
headerTitleStyle={headerTitleStyle}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
backgroundColor: 'transparent',
|
|
145
|
-
}
|
|
146
|
-
: null,
|
|
147
|
-
headerStyle,
|
|
148
|
-
headerShadowVisible === false
|
|
149
|
-
? { shadowOpacity: 0, borderBottomWidth: 0 }
|
|
150
|
-
: null,
|
|
151
|
-
]}
|
|
141
|
+
headerTransparent={headerTransparent}
|
|
142
|
+
headerShadowVisible={headerShadowVisible}
|
|
143
|
+
headerBackground={headerBackground}
|
|
144
|
+
headerStyle={headerStyle}
|
|
152
145
|
/>
|
|
153
146
|
)
|
|
154
147
|
}
|