@momo-kits/foundation 0.89.1-beta.5 → 0.89.1-rc.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.
@@ -288,7 +288,6 @@ const HeaderRightAction: React.FC<any> = ({children, ...restProps}) => {
288
288
  const HeaderToolkitAction: React.FC<any> = ({
289
289
  tintColor,
290
290
  pinnedTool,
291
- runtimeTools = [],
292
291
  preventBack,
293
292
  }) => {
294
293
  const {theme, navigator} = useContext(ApplicationContext);
@@ -323,7 +322,7 @@ const HeaderToolkitAction: React.FC<any> = ({
323
322
  onAction?.('onMore');
324
323
  navigator?.maxApi?.dispatchFunction?.(
325
324
  'showTools',
326
- {runtimeTools},
325
+ [undefined],
327
326
  (res: {item: {action?: string; key: string}}) => {
328
327
  const {item} = res;
329
328
  navigator?.toolkitCallback?.(item);
@@ -139,22 +139,13 @@ export type PinnedToolType = {
139
139
  badgeType?: 'number' | 'dot';
140
140
  };
141
141
 
142
- export type RuntimeToolType = {
143
- title: {vi: string; en: string};
144
- icon: string;
145
- key: string;
146
- };
147
-
148
142
  export interface NavigationOptions extends StackNavigationOptions {
149
143
  preventBack?: PopupNotifyProps;
150
144
  onPressLeftHeader?: () => void;
151
145
  surface?: boolean;
152
146
  hiddenBack?: boolean;
153
147
  customTitle?: TitleCustomProps;
154
- toolkitParams?: {
155
- pinnedTool?: PinnedToolType;
156
- runtimeTools?: RuntimeToolType[];
157
- };
148
+ pinnedTool?: PinnedToolType;
158
149
  }
159
150
 
160
151
  export interface HeaderBackProps extends NavigationButtonProps {
@@ -126,15 +126,14 @@ const getOptions = (params: NavigationOptions, theme: Theme) => {
126
126
  };
127
127
  }
128
128
 
129
- if (params.toolkitParams) {
129
+ if (params.pinnedTool) {
130
130
  options = {
131
131
  ...options,
132
132
  headerRight: (props: any) => {
133
133
  return (
134
134
  <HeaderToolkitAction
135
135
  preventBack={params.preventBack}
136
- pinnedTool={params.toolkitParams?.pinnedTool}
137
- runtimeTools={params.toolkitParams?.runtimeTools}
136
+ pinnedTool={params.pinnedTool}
138
137
  {...props}
139
138
  />
140
139
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.89.1-beta.5",
3
+ "version": "0.89.1-rc.1",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {