@momo-kits/tab-view 0.151.2-beta.40 → 0.152.1-beta.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.
package/index.tsx CHANGED
@@ -52,7 +52,7 @@ const TabComponent: ForwardRefRenderFunction<TabViewRef, TabViewProps> = (
52
52
  const { theme } = useContext(ApplicationContext);
53
53
  const app = useContext<any>(MiniAppContext);
54
54
  const screen = useContext<any>(ScreenContext);
55
- const [scrollEnabled, setScrollEnabled] = useState<boolean>(true);
55
+ let scrollEnabled = useRef(false);
56
56
 
57
57
  const componentName = 'TabView';
58
58
 
@@ -137,10 +137,10 @@ const TabComponent: ForwardRefRenderFunction<TabViewRef, TabViewProps> = (
137
137
  {...pagerProps}
138
138
  onPageScroll={onPageScroll}
139
139
  ref={pagerRef}
140
- scrollEnabled={scrollEnabled}
140
+ scrollEnabled={scrollEnabled.current}
141
141
  onLayout={e => {
142
142
  pagerProps?.onLayout?.(e);
143
- setScrollEnabled(pagerProps?.scrollEnabled ?? true);
143
+ scrollEnabled.current = pagerProps?.scrollEnabled ?? false;
144
144
  }}
145
145
  onPageSelected={onPageSelected}
146
146
  style={styles.pagerView}
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
- "name": "@momo-kits/tab-view",
3
- "version": "0.151.2-beta.40",
4
- "private": false,
5
- "main": "index.tsx",
6
- "peerDependencies": {
7
- "@momo-kits/foundation": "latest",
8
- "react": "*",
9
- "react-native": "*"
10
- },
11
- "devDependencies": {
12
- "@momo-platform/versions": "4.1.11"
13
- },
14
- "license": "MoMo",
15
- "publishConfig": {
16
- "registry": "https://registry.npmjs.org/"
17
- },
18
- "dependencies": {}
19
- }
2
+ "name": "@momo-kits/tab-view",
3
+ "version": "0.152.1-beta.1",
4
+ "private": false,
5
+ "main": "index.tsx",
6
+ "peerDependencies": {
7
+ "@momo-kits/foundation": "latest",
8
+ "react": "*",
9
+ "react-native": "*"
10
+ },
11
+ "devDependencies": {
12
+ "@momo-platform/versions": "4.1.11"
13
+ },
14
+ "license": "MoMo",
15
+ "publishConfig": {
16
+ "registry": "https://registry.npmjs.org/"
17
+ },
18
+ "dependencies": {}
19
+ }
package/styles.ts CHANGED
@@ -1,8 +1,8 @@
1
- import {StyleSheet} from 'react-native';
2
- import {Colors, Radius, Spacing} from '@momo-kits/foundation';
1
+ import { StyleSheet } from 'react-native';
2
+ import { Colors, Radius, Spacing } from '@momo-kits/foundation';
3
3
 
4
4
  export default StyleSheet.create({
5
- pagerView: {flex: 1},
5
+ pagerView: { flex: 1 },
6
6
  textCenter: {
7
7
  textAlign: 'center',
8
8
  },
@@ -53,8 +53,6 @@ export default StyleSheet.create({
53
53
  justifyContent: 'center',
54
54
  alignItems: 'center',
55
55
  paddingHorizontal: Spacing.S,
56
- paddingTop: Spacing.S,
57
- paddingBottom: Spacing.M,
58
56
  },
59
57
  cardTabOverlay: {
60
58
  flexDirection: 'row',
@@ -68,7 +66,6 @@ export default StyleSheet.create({
68
66
  height: '100%',
69
67
  alignItems: 'center',
70
68
  justifyContent: 'center',
71
- paddingVertical: Spacing.M,
72
69
  paddingHorizontal: Spacing.S,
73
70
  flexDirection: 'row',
74
71
  },
@@ -59,7 +59,7 @@ const TabItem: FC<TabItemProps> = ({
59
59
  styles.tabItem,
60
60
  {
61
61
  width,
62
- height: scaleSize(48),
62
+ height:48,
63
63
  flexDirection: 'row',
64
64
  overflow: 'hidden',
65
65
  paddingVertical: Spacing.M,