Skip to content

Commit 3f268b1

Browse files
committed
Fix import (cycle) + generate types
1 parent ecbc6e0 commit 3f268b1

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

generatedTypes/components/tabController/TabBarItem.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { PureComponent } from 'react';
2-
import { TextStyle, LayoutRectangle, LayoutChangeEvent, StyleProp, ViewStyle } from 'react-native';
2+
import { /* processColor, */ TextStyle, LayoutChangeEvent, StyleProp, ViewStyle } from 'react-native';
33
import _ from 'lodash';
44
import Reanimated from 'react-native-reanimated';
55
import { State } from 'react-native-gesture-handler';
@@ -86,7 +86,7 @@ interface Props extends TabControllerItemProps {
8686
targetPage: any;
8787
state: State;
8888
currentPage: Reanimated.Adaptable<number>;
89-
onLayout: (layout: Partial<LayoutRectangle>, index: number) => void;
89+
onLayout?: (event: LayoutChangeEvent, index: number) => void;
9090
}
9191
/**
9292
* @description: TabController's TabBarItem
@@ -102,8 +102,7 @@ export default class TabBarItem extends PureComponent<Props> {
102102
private itemWidth?;
103103
private itemRef;
104104
constructor(props: Props);
105-
onStateChange: (...args: any[]) => void;
106-
onLayout: ({ nativeEvent: { layout: { width } } }: LayoutChangeEvent) => void;
105+
onLayout: (event: LayoutChangeEvent) => void;
107106
onPress: () => void;
108107
getItemStyle(): any[];
109108
getLabelStyle(): (TextStyle | _.Dictionary<Reanimated.Node<number> | Reanimated.Node<string | number | boolean> | Reanimated.Node<"normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900"> | undefined> | undefined)[];

src/components/tabController/TabBarItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {Colors, Typography, Spacings} from '../../style';
99
import Badge, {BadgeProps, BADGE_SIZES} from '../../components/badge';
1010
import {TouchableOpacity} from '../../incubator';
1111

12-
const {cond, eq, call, block, event, and} = Reanimated;
12+
const {cond, eq, call, block, and} = Reanimated;
1313

1414
const DEFAULT_LABEL_COLOR = Colors.black;
1515
const DEFAULT_SELECTED_LABEL_COLOR = Colors.blue30;

src/helpers/FocusItemHelper.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import _ from 'lodash';
22
import {RefObject, useState, useCallback, useEffect, useRef} from 'react';
33
import {LayoutChangeEvent, ScrollView, FlatList, NativeSyntheticEvent, NativeScrollEvent} from 'react-native';
4-
import {Constants} from 'react-native-ui-lib';
4+
import {Constants} from '.';
55

66
export enum OffsetType {
77
CENTER = 'CENTER',
@@ -68,7 +68,6 @@ export type ResultProps = {
6868
* Use in order to focus the item with the specified index
6969
*/
7070
focusIndex: (index: number, animated?: boolean) => void;
71-
// focusIndex: ([]) => void;
7271
};
7372

7473
const focusItemsHelper = (props: Props): ResultProps => {

0 commit comments

Comments
 (0)