@momo-kits/foundation 0.75.1-beta.11 → 0.75.1-beta.12

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/Layout/Card.tsx CHANGED
@@ -115,20 +115,20 @@ const Card: React.FC<CardProps> = ({children, style}) => {
115
115
  return element;
116
116
  };
117
117
 
118
- const styles: any = style ?? {};
119
-
120
118
  return (
121
119
  <GridContext.Provider value={gridContext}>
122
120
  <View
123
121
  accessibilityLabel={`Card`}
124
- style={{
125
- ...styles,
126
- width: widthSection,
127
- marginHorizontal: gridContext.margin,
128
- padding: 12,
129
- flexDirection: 'row',
130
- flexWrap: 'wrap',
131
- }}>
122
+ style={[
123
+ style,
124
+ {
125
+ width: widthSection,
126
+ marginHorizontal: gridContext.margin,
127
+ padding: 12,
128
+ flexDirection: 'row',
129
+ flexWrap: 'wrap',
130
+ },
131
+ ]}>
132
132
  {renderView(validateChildren(children, [Item]))}
133
133
  {GRIDVIEW && renderOverlay()}
134
134
  </View>
package/Layout/Item.tsx CHANGED
@@ -33,22 +33,22 @@ const Item: React.FC<ItemProps> = ({
33
33
  );
34
34
  };
35
35
 
36
- const styles: any = style ?? {};
37
-
38
36
  return (
39
37
  <View
40
38
  accessibilityLabel={`Item`}
41
- style={{
42
- ...styles,
43
- width: grid.getSizeSpan(widthSpan),
44
- height: heightSpan ? grid.getSizeSpan(heightSpan) : undefined,
45
- overflow: 'hidden',
46
- margin: undefined,
47
- marginTop: undefined,
48
- marginBottom: undefined,
49
- marginLeft: undefined,
50
- marginRight: undefined,
51
- }}>
39
+ style={[
40
+ style,
41
+ {
42
+ width: grid.getSizeSpan(widthSpan),
43
+ height: heightSpan ? grid.getSizeSpan(heightSpan) : undefined,
44
+ overflow: 'hidden',
45
+ margin: undefined,
46
+ marginTop: undefined,
47
+ marginBottom: undefined,
48
+ marginLeft: undefined,
49
+ marginRight: undefined,
50
+ },
51
+ ]}>
52
52
  {children}
53
53
  {GRIDVIEW && renderOverlay()}
54
54
  </View>
@@ -5,15 +5,16 @@ import {Icon} from '../Icon';
5
5
 
6
6
  const Tab = createBottomTabNavigator();
7
7
 
8
- const BottomTab: FC<BottomTabProps> = ({tabs}) => {
8
+ const BottomTab: FC<BottomTabProps> = ({tabs, listeners}) => {
9
9
  return (
10
10
  <Tab.Navigator>
11
11
  {tabs.map((item, index) => {
12
12
  return (
13
13
  <Tab.Screen
14
- key={`${item.label}-${index}`}
15
- name={item.label}
14
+ key={item.name}
15
+ name={item.name}
16
16
  component={item.screen}
17
+ listeners={listeners}
17
18
  options={{
18
19
  tabBarLabel: item.label,
19
20
  tabBarBadge: item?.badgeLabel,
@@ -2,6 +2,7 @@ import {Animated, ScrollViewProps, ViewProps} from 'react-native';
2
2
  import React from 'react';
3
3
  import Navigator from './Navigator';
4
4
  import {PopupNotifyProps} from '../Popup/types';
5
+ import {ScreenListeners} from '@react-navigation/core/lib/typescript/src/types';
5
6
 
6
7
  export type Theme = {
7
8
  dark: boolean;
@@ -146,6 +147,7 @@ export type HeaderToolkitProps = {
146
147
  };
147
148
 
148
149
  export type BottomTabItemProps = {
150
+ name: string;
149
151
  label: string;
150
152
  icon: string;
151
153
  showDot?: boolean;
@@ -155,4 +157,8 @@ export type BottomTabItemProps = {
155
157
 
156
158
  export type BottomTabProps = {
157
159
  tabs: BottomTabItemProps[];
160
+ listeners: {
161
+ tabPress?: any;
162
+ focus?: any;
163
+ };
158
164
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.75.1-beta.11",
3
+ "version": "0.75.1-beta.12",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {