@momo-kits/foundation 0.76.1-beta.2 → 0.77.1-optimize.2

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.
Files changed (100) hide show
  1. package/Application/BottomTab/BottomTabBar.tsx +478 -0
  2. package/Application/BottomTab/index.tsx +134 -0
  3. package/Application/Components.tsx +339 -161
  4. package/Application/ModalScreen.tsx +113 -99
  5. package/Application/Navigation.ts +22 -16
  6. package/Application/NavigationContainer.tsx +99 -48
  7. package/Application/Navigator.ts +110 -41
  8. package/Application/StackScreen.tsx +126 -8
  9. package/Application/index.ts +23 -4
  10. package/Application/types.ts +84 -33
  11. package/Application/utils.tsx +90 -50
  12. package/Assets/DotAnimation.json +256 -0
  13. package/Assets/SpinnerAnimation.json +1027 -0
  14. package/Assets/icon.json +83 -5
  15. package/Assets/icon_bank.json +506 -0
  16. package/Assets/language.json +202 -0
  17. package/Badge/Badge.tsx +56 -0
  18. package/Badge/BadgeDot.tsx +11 -0
  19. package/Badge/BadgeRibbon.tsx +125 -0
  20. package/Badge/Shape.tsx +29 -0
  21. package/Badge/index.tsx +7 -0
  22. package/Badge/styles.ts +58 -0
  23. package/Badge/types.ts +63 -0
  24. package/Button/index.tsx +90 -39
  25. package/Button/styles.ts +19 -0
  26. package/CheckBox/index.tsx +58 -43
  27. package/CheckBox/styles.ts +1 -1
  28. package/CheckBox/types.ts +6 -4
  29. package/Consts/colors+spacing+radius.ts +18 -0
  30. package/Consts/styles.ts +0 -26
  31. package/Consts/theme.ts +4 -0
  32. package/Divider/index.tsx +2 -0
  33. package/Icon/index.tsx +13 -9
  34. package/Icon/types.ts +4 -3
  35. package/IconButton/index.tsx +24 -15
  36. package/Image/index.tsx +60 -48
  37. package/Image/styles.ts +1 -9
  38. package/Image/types.ts +5 -1
  39. package/Input/Input.tsx +227 -116
  40. package/Input/InputDropDown.tsx +132 -0
  41. package/Input/InputMoney.tsx +174 -111
  42. package/Input/InputOTP.tsx +257 -0
  43. package/Input/InputSearch.tsx +160 -132
  44. package/Input/InputTextArea.tsx +150 -123
  45. package/Input/common.tsx +42 -17
  46. package/Input/index.tsx +204 -18
  47. package/Input/styles.ts +44 -7
  48. package/Input/utils.ts +2 -2
  49. package/Layout/Card.tsx +67 -29
  50. package/Layout/FloatingButton.tsx +128 -0
  51. package/Layout/GridSystem.tsx +31 -21
  52. package/Layout/Item.tsx +21 -25
  53. package/Layout/ItemList.tsx +55 -0
  54. package/Layout/ItemSectionList.tsx +39 -0
  55. package/Layout/Screen.tsx +348 -153
  56. package/Layout/Section.tsx +66 -34
  57. package/Layout/index.ts +13 -3
  58. package/Layout/styles.ts +101 -0
  59. package/Layout/types.ts +1 -39
  60. package/Layout/utils.ts +27 -52
  61. package/Loader/DotLoader.tsx +37 -0
  62. package/Loader/Loader.tsx +13 -0
  63. package/Loader/ProgressBar.tsx +44 -0
  64. package/Loader/Spinner.tsx +29 -0
  65. package/Loader/index.tsx +4 -0
  66. package/Loader/styles.ts +10 -0
  67. package/Loader/types.ts +35 -0
  68. package/Loader/utils.ts +25 -0
  69. package/Pagination/PaginationDot.tsx +7 -2
  70. package/Pagination/PaginationNumber.tsx +8 -6
  71. package/Pagination/PaginationScroll.tsx +0 -1
  72. package/Pagination/PaginationWhiteDot.tsx +8 -5
  73. package/Pagination/styles.ts +3 -0
  74. package/Pagination/types.ts +2 -0
  75. package/Popup/PopupNotify.tsx +102 -44
  76. package/Popup/PopupPromotion.tsx +63 -22
  77. package/Popup/types.ts +15 -4
  78. package/Radio/index.tsx +35 -21
  79. package/Radio/types.ts +7 -5
  80. package/Skeleton/index.tsx +1 -1
  81. package/Skeleton/types.ts +3 -0
  82. package/Switch/index.tsx +35 -24
  83. package/Switch/types.ts +5 -3
  84. package/Tag/index.tsx +2 -4
  85. package/Text/index.tsx +27 -22
  86. package/Text/styles.ts +38 -0
  87. package/Text/types.ts +25 -13
  88. package/Text/utils.ts +1 -1
  89. package/Title/index.tsx +186 -0
  90. package/Title/styles.ts +79 -0
  91. package/Title/types.ts +20 -0
  92. package/code-scanner.js +143 -0
  93. package/index.ts +8 -1
  94. package/migrate_typo.js +56 -0
  95. package/package.json +14 -9
  96. package/tsconfig.json +24 -0
  97. package/verify.js +47 -0
  98. package/Application/BottomTab.tsx +0 -52
  99. package/Application/NavigationButton.tsx +0 -54
  100. package/Assets/header-background.png +0 -0
@@ -1,4 +1,4 @@
1
- import {StackActions} from '@react-navigation/native';
1
+ import {CommonActions, StackActions} from '@react-navigation/native';
2
2
  import {
3
3
  BottomSheetParams,
4
4
  HeaderToolkitProps,
@@ -8,74 +8,143 @@ import {
8
8
 
9
9
  class Navigator {
10
10
  ref?: any;
11
+ isReady?: any;
11
12
  toolkitConfig?: HeaderToolkitProps;
12
13
  maxApi?: any;
14
+ dismissData?: any;
15
+ toolkitCallback?: (item: any) => void;
13
16
 
14
- constructor(navigation: any) {
17
+ constructor(navigation: any, isReady: any) {
15
18
  this.ref = navigation;
19
+ this.isReady = isReady;
16
20
  }
17
21
 
22
+ /**
23
+ * push new stack screen
24
+ * @param params
25
+ */
18
26
  push = (params: ScreenParams) => {
19
- this.ref.current.dispatch(StackActions.push('Stack', params));
27
+ if (this.isReady.current) {
28
+ this.ref.current.dispatch(StackActions.push('Stack', params));
29
+ }
20
30
  };
21
31
 
32
+ /**
33
+ * replace current screen with new screen
34
+ * @param params
35
+ */
22
36
  replace = (params: ScreenParams) => {
23
- this.ref.current.dispatch(StackActions.replace('Stack', params));
37
+ if (this.isReady.current) {
38
+ this.ref.current.dispatch(StackActions.replace('Stack', params));
39
+ }
24
40
  };
25
-
41
+ /**
42
+ * pop to dismiss a screen
43
+ * @param count
44
+ */
26
45
  pop = (count?: number) => {
27
- this.ref.current.dispatch(StackActions.pop(count ?? 1));
46
+ if (this.isReady.current) {
47
+ this.ref.current.dispatch(StackActions.pop(count ?? 1));
48
+ }
28
49
  };
29
50
 
51
+ /**
52
+ * present a new screen, show from bottom iOS
53
+ * @param params
54
+ */
30
55
  present = (params: ScreenParams) => {
31
- this.ref.current.dispatch(StackActions.push('Dialog', params));
56
+ if (this.isReady.current) {
57
+ this.ref.current.dispatch(StackActions.push('Dialog', params));
58
+ }
32
59
  };
33
60
 
61
+ /**
62
+ * show a modal popup
63
+ * @param params
64
+ */
34
65
  showModal = (params: ModalParams) => {
35
- this.ref.current.dispatch(StackActions.push('Modal', params));
66
+ if (this.isReady.current) {
67
+ this.ref.current.dispatch(StackActions.push('Modal', params));
68
+ }
36
69
  };
37
70
 
71
+ /**
72
+ * show a bottom sheet
73
+ * @param params
74
+ */
38
75
  showBottomSheet = (params: BottomSheetParams) => {
39
- this.ref.current.dispatch(
40
- StackActions.push('Modal', {
41
- ...params,
42
- isBottomSheet: true,
43
- }),
44
- );
76
+ if (this.isReady.current) {
77
+ this.ref.current.dispatch(
78
+ StackActions.push('Modal', {
79
+ ...params,
80
+ isBottomSheet: true,
81
+ }),
82
+ );
83
+ }
45
84
  };
46
85
 
86
+ /**
87
+ * pop all screen route
88
+ */
47
89
  popToTop = () => {
48
- this.ref.current.dispatch(StackActions.popToTop());
90
+ if (this.isReady.current) {
91
+ this.ref.current.dispatch(StackActions.popToTop());
92
+ }
93
+ };
94
+
95
+ /**
96
+ * navigate
97
+ * @param name
98
+ * @param params
99
+ */
100
+ navigate = (name: string, params: any) => {
101
+ if (this.isReady.current) {
102
+ this.ref.current.dispatch(
103
+ CommonActions.navigate({
104
+ name,
105
+ params,
106
+ }),
107
+ );
108
+ }
49
109
  };
50
110
 
51
- requestApi = (func: any, args: any = [], callback: any) => {
52
- if (this.maxApi) {
53
- this.maxApi[func]?.(...args, callback);
54
- } else {
55
- const instance: any = global;
56
- instance?.miniAppApi?.dispatch?.(func, ...args, callback);
111
+ /**
112
+ * reset a navigation flow with new screen
113
+ * @param params
114
+ */
115
+ reset = (params: ScreenParams) => {
116
+ if (this.isReady.current) {
117
+ this.ref.current.dispatch(
118
+ CommonActions.reset({
119
+ index: 0,
120
+ routes: [
121
+ {
122
+ name: 'Stack',
123
+ key: `Stack_${new Date().getTime()}`,
124
+ params,
125
+ },
126
+ ],
127
+ }),
128
+ );
57
129
  }
58
130
  };
59
- getToolkit = async (): Promise<HeaderToolkitProps | undefined> => {
60
- return new Promise(resolve => {
61
- if (this.toolkitConfig) {
62
- resolve(this.toolkitConfig);
63
- return;
64
- }
65
- this.requestApi('getToolkit', [undefined], (result: boolean) => {
66
- if (result) {
67
- this.requestApi('getToolkitConfig', [undefined], (config: any) => {
68
- this.toolkitConfig = {
69
- ...config?.utilityToolConfig,
70
- appCode: config?.appCode,
71
- };
72
- resolve(this.toolkitConfig);
73
- });
74
- } else {
75
- resolve(undefined);
76
- }
77
- });
78
- });
131
+
132
+ /**
133
+ * dismiss a feature data
134
+ * @param data
135
+ */
136
+ setDismissData = (data: any) => {
137
+ this.dismissData = data;
138
+ };
139
+
140
+ /**
141
+ * set callback function for toolkit
142
+ * @param callback
143
+ */
144
+ setToolkitCallback = (
145
+ callback: (item: {key: string; action: string}) => void,
146
+ ) => {
147
+ this.toolkitCallback = callback;
79
148
  };
80
149
  }
81
150
 
@@ -1,27 +1,145 @@
1
- import React, {useContext, useEffect} from 'react';
1
+ import React, {useContext, useEffect, useLayoutEffect, useRef} from 'react';
2
2
  import {ScreenParams} from './types';
3
3
  import Navigation from './Navigation';
4
- import {ApplicationContext} from './index';
4
+ import {ApplicationContext, MiniAppContext, ScreenContext} from './index';
5
+ import {GridSystem} from '../Layout';
6
+ import {useHeaderHeight} from '@react-navigation/stack';
7
+ import {Alert, InteractionManager} from 'react-native';
5
8
 
6
9
  const StackScreen: React.FC<ScreenParams> = props => {
7
- const {screen: Component, options}: ScreenParams = props.route.params;
8
- const {theme, navigator} = useContext(ApplicationContext);
10
+ const {theme, showGrid, navigator} = useContext(ApplicationContext);
11
+ const startTime = useRef(Date.now());
12
+ const endTime = useRef(Date.now());
13
+ const timeLoad = useRef(0);
14
+ const timeInteraction = useRef(0);
15
+ const timeoutLoad = useRef<any>();
16
+ const tracked = useRef<any>({
17
+ releaseLoad: undefined,
18
+ releaseInteraction: undefined,
19
+ timeoutLoad: undefined,
20
+ timeoutInteraction: undefined,
21
+ });
22
+ const interaction = useRef<any>();
23
+ const context = useContext<any>(MiniAppContext);
24
+
25
+ const {screen: Component, options, initialParams} = props.route.params;
9
26
  const navigation = new Navigation(props.navigation, theme);
27
+ const heightHeader = useHeaderHeight();
10
28
 
11
- const params = {
29
+ const data = {
30
+ ...initialParams,
12
31
  ...props.route.params,
13
32
  navigation,
14
33
  };
15
34
 
16
- delete params.screen;
35
+ delete data.screen;
36
+ delete data.initialParams;
17
37
 
18
- useEffect(() => {
38
+ const screenName = Component?.name || Component?.type?.name || 'Invalid';
39
+
40
+ /**
41
+ * set options for screen
42
+ */
43
+ useLayoutEffect(() => {
19
44
  if (options) {
20
45
  navigation.setOptions(options);
21
46
  }
22
47
  }, [options]);
23
48
 
24
- return <Component {...params} />;
49
+ /**
50
+ * tracking for screen
51
+ */
52
+ useEffect(() => {
53
+ if (__DEV__ && (!screenName || screenName == 'Invalid')) {
54
+ Alert.alert('Design system', `Unvalidated screen name "${screenName}" !`);
55
+ }
56
+
57
+ navigator?.maxApi?.of?.({screenName});
58
+
59
+ tracked.current.timeoutLoad = setTimeout(() => {
60
+ onScreenLoad();
61
+ }, 5000);
62
+ tracked.current.timeoutInteraction = setTimeout(() => {
63
+ onScreenInteraction();
64
+ }, 5000);
65
+ return () => {
66
+ onScreenLoad();
67
+ onScreenInteraction();
68
+ };
69
+ }, []);
70
+
71
+ /**
72
+ * tracking for screen load
73
+ */
74
+ const onScreenLoad = () => {
75
+ clearTimeout(tracked.current.timeoutLoad);
76
+ if (!tracked.current?.releaseLoad) {
77
+ navigator?.maxApi?.dispatchFunction?.('autoTracking', {
78
+ appId: context.appId,
79
+ code: context.code,
80
+ screenName,
81
+ componentName: 'Screen',
82
+ state: 'load',
83
+ time: timeLoad.current,
84
+ });
85
+ navigator?.maxApi?.showToastDebug?.({
86
+ appId: `auto - ${context.appId}`,
87
+ message: `${screenName} screen_load_time ${timeLoad.current}`,
88
+ });
89
+ tracked.current.releaseLoad = true;
90
+ }
91
+ };
92
+
93
+ /**
94
+ * tracking for screen load
95
+ */
96
+ const onScreenInteraction = () => {
97
+ clearTimeout(tracked.current.timeoutInteraction);
98
+ if (!tracked.current?.releaseInteraction) {
99
+ navigator?.maxApi?.dispatchFunction?.('autoTracking', {
100
+ appId: context.appId,
101
+ code: context.code,
102
+ screenName,
103
+ componentName: 'Screen',
104
+ state: 'interaction',
105
+ time: timeInteraction.current,
106
+ });
107
+
108
+ navigator?.maxApi?.showToastDebug?.({
109
+ appId: `auto - ${context.appId}`,
110
+ message: `${screenName} screen_interaction_time ${timeInteraction.current}`,
111
+ });
112
+ tracked.current.releaseInteraction = true;
113
+ }
114
+ };
115
+
116
+ return (
117
+ <ScreenContext.Provider
118
+ value={{
119
+ screenName,
120
+ onElementLoad: () => {
121
+ endTime.current = Date.now();
122
+ interaction.current?.cancel?.();
123
+ interaction.current = InteractionManager.runAfterInteractions(() => {
124
+ timeInteraction.current = Date.now() - startTime.current;
125
+ });
126
+ clearTimeout(timeoutLoad.current);
127
+ timeoutLoad.current = setTimeout(() => {
128
+ if (timeLoad.current === 0) {
129
+ timeLoad.current = endTime.current - startTime.current;
130
+ }
131
+ }, 2000);
132
+ },
133
+ }}>
134
+ <Component
135
+ heightHeader={heightHeader}
136
+ {...data}
137
+ onScreenLoad={onScreenLoad}
138
+ onScreenInteraction={onScreenInteraction}
139
+ />
140
+ {showGrid && <GridSystem />}
141
+ </ScreenContext.Provider>
142
+ );
25
143
  };
26
144
 
27
145
  export default StackScreen;
@@ -1,18 +1,37 @@
1
+ import {Platform} from 'react-native';
1
2
  import {NavigationContainer} from './NavigationContainer';
2
3
  import Screen from '../Layout/Screen';
3
- import NavigationButton from './NavigationButton';
4
- import {HeaderRightAction} from './Components';
4
+ import {
5
+ HeaderAnimated,
6
+ HeaderBackground,
7
+ HeaderCustom,
8
+ HeaderRightAction,
9
+ HeaderTitle,
10
+ NavigationButton,
11
+ } from './Components';
5
12
  import BottomTab from './BottomTab';
6
13
  import {createContext} from 'react';
7
14
  import {defaultContext} from '../Consts';
8
15
 
16
+ const Context = createContext({});
9
17
  const ApplicationContext = createContext(defaultContext);
10
18
 
19
+ const MiniAppContext = (Platform as any).MiniAppContext ?? Context;
20
+ const ScreenContext = (Platform as any).ScreenContext ?? Context;
21
+ const ComponentContext = (Platform as any).ComponentContext ?? Context;
22
+
11
23
  export {
12
- NavigationContainer,
13
24
  ApplicationContext,
25
+ MiniAppContext,
26
+ ScreenContext,
27
+ ComponentContext,
28
+ NavigationContainer,
14
29
  Screen,
30
+ BottomTab,
15
31
  NavigationButton,
32
+ HeaderTitle,
33
+ HeaderBackground,
16
34
  HeaderRightAction,
17
- BottomTab,
35
+ HeaderCustom,
36
+ HeaderAnimated,
18
37
  };
@@ -1,8 +1,11 @@
1
- import {Animated, ScrollViewProps, ViewProps} from 'react-native';
2
- import React, {ReactNode} from 'react';
3
- import Navigator from './Navigator';
1
+ import {StackNavigationOptions} from '@react-navigation/stack';
2
+ import React from 'react';
3
+ import {Animated, FlatListProps, ViewProps} from 'react-native';
4
4
  import {PopupNotifyProps} from '../Popup/types';
5
5
  import Navigation from './Navigation';
6
+ import Navigator from './Navigator';
7
+
8
+ type Screen = React.ComponentType<NavigationScreenProps>;
6
9
 
7
10
  export type Theme = {
8
11
  dark: boolean;
@@ -60,15 +63,39 @@ export type Theme = {
60
63
  };
61
64
 
62
65
  export type Context = {
66
+ [key: string]: any;
63
67
  theme: Theme;
64
68
  navigator?: Navigator;
69
+ showGrid?: boolean;
70
+ translate?: (key: string) => string;
71
+ };
72
+
73
+ export type MiniAppInfo = {
74
+ [key: string]: any;
75
+ code: string;
76
+ appId: string;
77
+ buildNumber: number;
78
+ flowPartnerId?: string;
79
+ toolkitConfig?: any;
80
+ fromCode?: string;
81
+ };
82
+
83
+ export type LocalizationObject = {
84
+ vi: {
85
+ [key: string]: string;
86
+ };
87
+ en: {
88
+ [key: string]: string;
89
+ };
65
90
  };
66
91
 
67
92
  export type NavigationContainerProps = {
68
- screen: React.ElementType;
93
+ screen: Screen;
69
94
  options?: NavigationOptions;
70
95
  theme: Theme;
71
- maxApi?: any;
96
+ maxApi: any;
97
+ localization?: LocalizationObject;
98
+ initialParams?: any;
72
99
  };
73
100
 
74
101
  export type NavigationScreenProps = {
@@ -77,27 +104,14 @@ export type NavigationScreenProps = {
77
104
  navigation: Navigation;
78
105
  };
79
106
 
80
- export interface ScreenProps extends ViewProps {
81
- navigation?: Navigation;
82
- enableKeyboardAvoidingView?: boolean;
83
- headerBackground?: string;
84
- scrollable?: boolean;
85
- useAnimatedHeader?: boolean;
86
- useExtendedHeader?: boolean;
87
- scrollViewProps?: ScrollViewProps;
88
- footerComponent?: ReactNode;
89
- marginHeader?: number;
90
- }
91
-
92
107
  export type ScreenParams = {
93
108
  [key: string]: any;
94
- screen: React.ElementType;
109
+ screen: Screen;
95
110
  options?: NavigationOptions;
96
111
  };
97
112
 
98
113
  export interface ModalParams extends ScreenParams {
99
114
  [key: string]: any;
100
- screen: React.ElementType;
101
115
  onDismiss?: () => void;
102
116
  barrierDismissible?: boolean;
103
117
  }
@@ -105,31 +119,48 @@ export interface ModalParams extends ScreenParams {
105
119
  export interface BottomSheetParams extends ScreenParams {
106
120
  [key: string]: any;
107
121
  onDismiss?: () => void;
122
+ footerComponent?: React.ReactNode;
123
+ flatListProps?: FlatListProps<any>;
108
124
  }
109
125
 
110
126
  export type NavigationButtonProps = {
111
127
  icon: string;
112
128
  tintColor?: string;
113
- backgroundColor?: string;
114
129
  useBorder?: boolean;
115
130
  onPress: () => void;
131
+ badgeType?: 'dot' | 'number';
132
+ badgeValue?: number;
116
133
  accessibilityLabel?: string;
117
134
  };
118
135
 
119
- export type NavigationOptions = {
136
+ export type PinnedToolType = {
137
+ key: string;
138
+ badgeValue?: number;
139
+ badgeType?: 'number' | 'dot';
140
+ };
141
+
142
+ export type RuntimeToolType = {
143
+ title: {vi: string; en: string};
144
+ icon: string;
145
+ key: string;
146
+ };
147
+
148
+ export interface NavigationOptions extends StackNavigationOptions {
120
149
  preventBack?: PopupNotifyProps;
150
+ onPressLeftHeader?: () => void;
121
151
  surface?: boolean;
122
- headerTransparent?: boolean;
123
- title?: string;
124
- headerTitle?: (props?: any) => React.ReactElement;
125
- headerTitleAlign?: 'left' | 'center';
152
+ hiddenBack?: boolean;
126
153
  customTitle?: TitleCustomProps;
127
- headerRight?: (props?: any) => React.ReactElement;
128
- animatedValue?: Animated.Value;
129
- };
154
+ toolkitParams?: {
155
+ pinnedTool?: PinnedToolType;
156
+ runtimeTools?: RuntimeToolType[];
157
+ preventClose?: PopupNotifyProps;
158
+ };
159
+ }
130
160
 
131
161
  export interface HeaderBackProps extends NavigationButtonProps {
132
162
  preventBack?: PopupNotifyProps;
163
+ onPressLeftHeader?: () => void;
133
164
  }
134
165
 
135
166
  export type HeaderBackgroundProps = {
@@ -152,24 +183,44 @@ export type TitleCustomProps = {
152
183
  export type HeaderToolkitProps = {
153
184
  [key: string]: any;
154
185
  appCode: string;
155
- hidden: boolean;
156
- type: string;
157
- onAction?: (action: string) => void;
186
+ configs: any[];
158
187
  };
159
188
 
189
+ export interface HeaderAnimatedProps extends ViewProps {
190
+ animatedValue: Animated.Value;
191
+ image: string;
192
+ }
193
+
160
194
  export type BottomTabItemProps = {
161
195
  name: string;
162
196
  label: string;
163
197
  icon: string;
164
198
  showDot?: boolean;
165
- badgeLabel?: string;
166
- screen: React.ComponentType<any>;
199
+ badgeLabel?: string | number;
200
+ screen: Screen;
201
+ options: NavigationOptions;
167
202
  };
168
203
 
169
204
  export type BottomTabProps = {
205
+ nested?: boolean;
170
206
  tabs: BottomTabItemProps[];
207
+ initialRouteName?: string;
208
+ navigation: Navigation;
171
209
  listeners?: {
172
210
  tabPress?: any;
173
211
  focus?: any;
174
212
  };
213
+ floatingButton?: FloatingButtonProps;
214
+ };
215
+
216
+ export type FloatingButtonProps = {
217
+ container?: React.ReactNode;
218
+ icon: string | React.ReactNode;
219
+ label: string;
220
+ onPress: () => void;
221
+ };
222
+
223
+ export type AnimatedHeader = {
224
+ type: 'default' | 'surface';
225
+ component?: (props?: any) => React.ReactElement;
175
226
  };