@momo-kits/foundation 0.92.6-rc.25 → 0.92.6-rc.26

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.
@@ -10,21 +10,26 @@ import {Text} from '../../Text';
10
10
  import {ApplicationContext} from '../index';
11
11
  import StackScreen from '../StackScreen';
12
12
  import {BottomTabProps, NavigationScreenProps} from '../types';
13
- import {getStackOptions} from '../utils';
13
+ import {getOptions, getStackOptions} from '../utils';
14
14
  import BottomTabBar from './BottomTabBar';
15
15
 
16
16
  const Tab = createBottomTabNavigator();
17
17
  const Stack = createStackNavigator();
18
18
 
19
19
  const TabScreen: React.FC<NavigationScreenProps> = ({route}) => {
20
+ const {theme} = useContext(ApplicationContext);
21
+ let options = {};
22
+ if (route.params?.options) {
23
+ options = getOptions(route.params?.options, theme);
24
+ }
20
25
  if (route.params?.nested) {
21
26
  return (
22
27
  <Stack.Navigator>
23
28
  <Stack.Screen
24
29
  name="Stack"
25
30
  component={StackScreen}
26
- initialParams={{screen: route.params?.screen}}
27
- options={{...getStackOptions(), ...route.params?.options}}
31
+ initialParams={{screen: route.params?.screen, options}}
32
+ options={{...getStackOptions()}}
28
33
  />
29
34
  </Stack.Navigator>
30
35
  );
@@ -35,7 +40,7 @@ const TabScreen: React.FC<NavigationScreenProps> = ({route}) => {
35
40
  <Stack.Screen
36
41
  name="Stack"
37
42
  component={StackScreen}
38
- initialParams={{screen: route.params?.screen}}
43
+ initialParams={{screen: route.params?.screen, options}}
39
44
  options={{...getStackOptions(), ...route.params?.options}}
40
45
  />
41
46
  </Stack.Navigator>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.92.6-rc.25",
3
+ "version": "0.92.6-rc.26",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},