@momo-kits/foundation 0.113.1-beta.2 → 0.113.1-beta.3
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/Application/StackScreen.tsx +2 -2
- package/Application/types.ts +5 -0
- package/Layout/Screen.tsx +2 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {useContext, useEffect, useLayoutEffect, useRef} from 'react';
|
|
2
2
|
import {useHeaderHeight} from '@react-navigation/stack';
|
|
3
3
|
import {Alert, InteractionManager} from 'react-native';
|
|
4
|
-
import {ScreenParams} from './types';
|
|
4
|
+
import {ScreenParams, ScreenTrackingParams} from './types';
|
|
5
5
|
import Navigation from './Navigation';
|
|
6
6
|
import {ApplicationContext, MiniAppContext, ScreenContext} from './index';
|
|
7
7
|
import {GridSystem} from '../Layout';
|
|
@@ -257,7 +257,7 @@ const StackScreen: React.FC<ScreenParams> = props => {
|
|
|
257
257
|
onScreenInteraction();
|
|
258
258
|
}, 2000);
|
|
259
259
|
},
|
|
260
|
-
onSetParams: (data:
|
|
260
|
+
onSetParams: (data: ScreenTrackingParams) => {
|
|
261
261
|
tracking.current.params = data;
|
|
262
262
|
},
|
|
263
263
|
}}>
|
package/Application/types.ts
CHANGED
|
@@ -117,6 +117,11 @@ export type ScreenParams = {
|
|
|
117
117
|
options?: NavigationOptions;
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
+
export type ScreenTrackingParams = {
|
|
121
|
+
value1?: any;
|
|
122
|
+
value2?: any;
|
|
123
|
+
};
|
|
124
|
+
|
|
120
125
|
export type ModalParams = {
|
|
121
126
|
[key: string]: any;
|
|
122
127
|
screen: React.ComponentType;
|
package/Layout/Screen.tsx
CHANGED
|
@@ -28,6 +28,7 @@ import Navigation from '../Application/Navigation';
|
|
|
28
28
|
import {
|
|
29
29
|
AnimatedHeader,
|
|
30
30
|
NavigationOptions,
|
|
31
|
+
ScreenTrackingParams,
|
|
31
32
|
SearchHeaderProps,
|
|
32
33
|
} from '../Application/types';
|
|
33
34
|
import {Colors, Spacing, Styles} from '../Consts';
|
|
@@ -152,7 +153,7 @@ export interface ScreenProps extends ViewProps {
|
|
|
152
153
|
/**
|
|
153
154
|
* Optional. Custom tracking params
|
|
154
155
|
*/
|
|
155
|
-
trackingParams?:
|
|
156
|
+
trackingParams?: ScreenTrackingParams;
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
const Screen = forwardRef(
|