@momo-kits/foundation 0.121.4-beta.1 → 0.10000.1

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.
@@ -55,6 +55,7 @@ const HeaderToolkitAction: React.FC<any> = ({
55
55
  useShortcut = false,
56
56
  useMore = false,
57
57
  tools = [],
58
+ useCloseIcon = false,
58
59
  }) => {
59
60
  const {navigator} = useContext(ApplicationContext);
60
61
  const context = useContext<any>(MiniAppContext);
@@ -104,14 +105,14 @@ const HeaderToolkitAction: React.FC<any> = ({
104
105
  );
105
106
 
106
107
  const onDismiss = () => {
107
- if (isWhiteList) {
108
- navigator?.maxApi?.dispatchFunction?.('dismissAll');
109
- } else {
108
+ if (useCloseIcon && !isWhiteList) {
110
109
  navigator?.maxApi?.dispatchFunction?.(
111
110
  'dismiss',
112
111
  navigator?.dismissData,
113
112
  undefined
114
113
  );
114
+ } else {
115
+ navigator?.maxApi?.dispatchFunction?.('dismissAll');
115
116
  }
116
117
  };
117
118
 
@@ -299,7 +300,9 @@ const HeaderToolkitAction: React.FC<any> = ({
299
300
  <Icon
300
301
  color={tintColor}
301
302
  source={
302
- isWhiteList ? '16_basic_home' : '16_navigation_close_circle'
303
+ useCloseIcon && !isWhiteList
304
+ ? '16_navigation_close_circle'
305
+ : '16_basic_home'
303
306
  }
304
307
  size={20}
305
308
  />
@@ -13,7 +13,6 @@ import {
13
13
  NavigationButton,
14
14
  } from './Components';
15
15
  import {setAutomationID, useComponentId} from './utils';
16
- import TrackingScope from './TrackingScope';
17
16
 
18
17
  const Context = createContext({});
19
18
  const ApplicationContext = createContext(defaultContext);
@@ -44,5 +43,4 @@ export {
44
43
  setAutomationID,
45
44
  useComponentId,
46
45
  TrackingScopeContext,
47
- TrackingScope,
48
46
  };
@@ -192,6 +192,7 @@ export type HeaderRightToolkit = {
192
192
  tools?: ToolGroup[];
193
193
  preventClose?: PopupNotifyProps;
194
194
  useMore?: boolean;
195
+ useCloseIcon?: boolean;
195
196
  };
196
197
 
197
198
  export interface HeaderBackProps extends NavigationButtonProps {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import {TrackingScopeContext} from './index';
2
+ import {TrackingScopeContext} from './Application';
3
3
 
4
4
  const TrackingScope = ({
5
5
  scopeName,
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.121.4-beta.1",
3
+ "version": "0.10000.1",
4
4
  "minimumDeployTarget": 32,
5
- "deploymentTarget": 121,
5
+ "deploymentTarget": 10000,
6
6
  "description": "React Native Component Kits",
7
7
  "main": "index.ts",
8
8
  "scripts": {},