@momo-kits/tab-view 0.169.11-beta.1 → 0.169.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/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@momo-kits/tab-view",
3
- "version": "0.169.11-beta.1",
3
+ "version": "0.169.12",
4
4
  "private": false,
5
- "license": "MoMo",
6
5
  "main": "index.tsx",
7
- "publishConfig": {
8
- "registry": "https://registry.npmjs.org/"
9
- },
10
- "dependencies": {},
11
6
  "peerDependencies": {
12
7
  "@momo-kits/foundation": "latest",
13
8
  "react": "*",
14
9
  "react-native": "*"
15
- }
10
+ },
11
+ "license": "MoMo",
12
+ "publishConfig": {
13
+ "registry": "https://registry.npmjs.org/"
14
+ },
15
+ "dependencies": {}
16
16
  }
@@ -7,14 +7,7 @@ import React, {
7
7
  useCallback,
8
8
  Ref,
9
9
  } from 'react';
10
- import {
11
- Animated,
12
- LayoutChangeEvent,
13
- ScrollView,
14
- View,
15
- type ScrollViewInstance,
16
- type ViewInstance,
17
- } from 'react-native';
10
+ import { Animated, LayoutChangeEvent, ScrollView, View } from 'react-native';
18
11
  import { Tab, TabBarProps } from '../types';
19
12
  import styles from '../styles';
20
13
  import { ApplicationContext } from '@momo-kits/foundation';
@@ -41,9 +34,9 @@ const ScrollableTabBar: FC<TabBarProps> = ({
41
34
  const animatedWidth = useRef(new Animated.Value(0)).current;
42
35
  const animX = useRef(new Animated.Value(0)).current;
43
36
 
44
- const scrollViewRef = useRef<ScrollViewInstance>(null);
45
- const contentRef = useRef<ViewInstance>(null);
46
- const itemRefs = useRef<Array<Ref<ViewInstance> | null>>([]);
37
+ const scrollViewRef = useRef<ScrollView>(null);
38
+ const contentRef = useRef<View>(null);
39
+ const itemRefs = useRef<Array<Ref<View> | null>>([]);
47
40
 
48
41
  const setMeasured = useCallback((index: number, width: number, x: number) => {
49
42
  setItemWidthMap(prev => {