@momo-kits/foundation 0.92.21 → 0.92.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.
@@ -101,7 +101,7 @@ const BottomTab: React.FC<BottomTabProps> = ({
101
101
  name={item.name}
102
102
  component={TabScreen}
103
103
  initialParams={{...item, nested}}
104
- listeners={listeners}
104
+ listeners={item.listeners ?? listeners}
105
105
  options={{
106
106
  tabBarLabel: ({color, focused}) => {
107
107
  return (
@@ -1,4 +1,5 @@
1
1
  import {StackNavigationOptions} from '@react-navigation/stack';
2
+ import {EventArg} from '@react-navigation/core';
2
3
  import React from 'react';
3
4
  import {Animated, ViewProps} from 'react-native';
4
5
  import {PopupNotifyProps} from '../Popup/types';
@@ -198,6 +199,11 @@ export type BottomTabItemProps = {
198
199
  screen: Screen;
199
200
  options: NavigationOptions;
200
201
  initialParams?: any;
202
+ listeners?: {
203
+ tabPress?: (e: EventArg<'tabPress', true, undefined>) => void;
204
+ focus?: (e: EventArg<'focus', false, unknown>) => void;
205
+ blur?: (e: EventArg<'blur', false, unknown>) => void;
206
+ };
201
207
  };
202
208
 
203
209
  export type BottomTabProps = {
@@ -206,8 +212,9 @@ export type BottomTabProps = {
206
212
  initialRouteName?: string;
207
213
  navigation: Navigation;
208
214
  listeners?: {
209
- tabPress?: any;
210
- focus?: any;
215
+ tabPress?: (e: EventArg<'tabPress', true, undefined>) => void;
216
+ focus?: (e: EventArg<'focus', false, unknown>) => void;
217
+ blur?: (e: EventArg<'blur', false, unknown>) => void;
211
218
  };
212
219
  floatingButton?: FloatingButtonProps;
213
220
  };
@@ -84,7 +84,7 @@ export const FloatingButton: React.FC<FloatingButtonProps> = ({
84
84
  });
85
85
 
86
86
  return () => {
87
- if (listener !== null) {
87
+ if (listener) {
88
88
  animatedValue?.removeListener(listener);
89
89
  }
90
90
  };
@@ -53,7 +53,7 @@ const GridSystem: React.FC<any> = ({
53
53
  {list.map((_, index) => {
54
54
  return (
55
55
  <View style={{flexDirection: 'row'}} key={index.toString()}>
56
- {index !== -0 && <View style={{width: grid.gutterSize}} />}
56
+ {index !== 0 && <View style={{width: grid.gutterSize}} />}
57
57
  <View
58
58
  key={`Grid${index.toString()}`}
59
59
  pointerEvents="none"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.92.21",
3
+ "version": "0.92.22",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},