@momo-kits/foundation 0.106.1-nav.21 → 0.106.1-nav.22

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.
@@ -27,7 +27,6 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
27
27
  maxApi,
28
28
  initialParams,
29
29
  localize = new Localize({vi: {}, en: {}}),
30
- headerRight,
31
30
  }) => {
32
31
  const navigationRef = useRef<NavigationContainerRef>(null);
33
32
  const isReady = useRef(false);
@@ -91,7 +90,7 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
91
90
  <Stack.Screen
92
91
  name="Stack"
93
92
  component={StackScreen}
94
- initialParams={{screen, initialParams, headerRight}}
93
+ initialParams={{screen, initialParams}}
95
94
  options={{
96
95
  ...getStackOptions(),
97
96
  ...(options as StackNavigationOptions),
@@ -27,12 +27,7 @@ const StackScreen: React.FC<ScreenParams> = props => {
27
27
  timeInteraction: 0,
28
28
  });
29
29
  const context = useContext<any>(MiniAppContext);
30
- const {
31
- screen: Component,
32
- options,
33
- initialParams,
34
- headerRight,
35
- } = props.route.params;
30
+ const {screen: Component, options, initialParams} = props.route.params;
36
31
  const navigation = new Navigation(props.navigation, context);
37
32
  const heightHeader = useHeaderHeight();
38
33
 
@@ -57,17 +52,6 @@ const StackScreen: React.FC<ScreenParams> = props => {
57
52
  }
58
53
  }, [options]);
59
54
 
60
- /**
61
- * set headerRight for screen
62
- */
63
- useLayoutEffect(() => {
64
- if (headerRight) {
65
- navigation.setOptions({
66
- headerRight,
67
- });
68
- }
69
- }, [headerRight]);
70
-
71
55
  /**
72
56
  * tracking for screen
73
57
  */
@@ -5,7 +5,12 @@ import Localize from './Localize';
5
5
  import Screen from '../Layout/Screen';
6
6
  import BottomTab from './BottomTab';
7
7
  import {defaultContext} from '../Consts';
8
- import {HeaderAnimated, NavigationButton} from './Components';
8
+ import {
9
+ HeaderAnimated,
10
+ HeaderBackground,
11
+ HeaderTitle,
12
+ NavigationButton,
13
+ } from './Components';
9
14
 
10
15
  const Context = createContext({});
11
16
  const ApplicationContext = createContext(defaultContext);
@@ -21,6 +26,8 @@ export {
21
26
  ComponentContext,
22
27
  NavigationContainer,
23
28
  Localize,
29
+ HeaderTitle,
30
+ HeaderBackground,
24
31
  NavigationButton,
25
32
  Screen,
26
33
  BottomTab,
@@ -98,7 +98,6 @@ export type NavigationContainerProps = {
98
98
  maxApi: any;
99
99
  initialParams?: any;
100
100
  localize: Localize;
101
- headerRight?: HeaderRightToolkit;
102
101
  };
103
102
 
104
103
  export type NavigationScreenProps = {
package/Layout/Screen.tsx CHANGED
@@ -49,7 +49,7 @@ export interface ScreenProps extends ViewProps {
49
49
  /**
50
50
  * Optional. Navigation object for handling navigation actions.
51
51
  */
52
- navigation: Navigation;
52
+ navigation?: Navigation;
53
53
 
54
54
  /**
55
55
  * Optional. If `true`, enable keyboard avoiding view for the screen.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.106.1-nav.21",
3
+ "version": "0.106.1-nav.22",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},