Skip to content

Commit 09c9044

Browse files
LinusUgorhom
andauthored
chore: updated deprecated AnimateProps type (#2524)(by @LinusU)
Co-authored-by: Mo Gorhom <gorhom.dev@gmail.com>
1 parent 5029c37 commit 09c9044

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

src/components/bottomSheetDebugView/ReText.webx.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useRef } from 'react';
22
import { type TextProps as RNTextProps, TextInput } from 'react-native';
33
import Animated, {
4+
type AnimatedProps,
45
type SharedValue,
56
useAnimatedReaction,
67
useDerivedValue,
@@ -9,7 +10,7 @@ import Animated, {
910
interface TextProps {
1011
text: string;
1112
value: SharedValue<number | boolean> | number;
12-
style?: Animated.AnimateProps<RNTextProps>['style'];
13+
style?: AnimatedProps<RNTextProps>['style'];
1314
}
1415

1516
const AnimatedTextInput = Animated.createAnimatedComponent(TextInput);

src/components/bottomSheetScrollable/BottomSheetFlashList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import type { FlashListProps } from '@shopify/flash-list';
33
import React, { forwardRef, memo, type Ref, useMemo } from 'react';
44
import type { ScrollViewProps } from 'react-native';
5-
import type Animated from 'react-native-reanimated';
5+
import type { AnimatedProps } from 'react-native-reanimated';
66
import BottomSheetScrollView from './BottomSheetScrollView';
77
import type {
88
BottomSheetScrollableProps,
@@ -19,7 +19,7 @@ try {
1919
} catch (_) {}
2020

2121
export type BottomSheetFlashListProps<T> = Omit<
22-
Animated.AnimateProps<FlashListProps<T>>,
22+
AnimatedProps<FlashListProps<T>>,
2323
'decelerationRate' | 'onScroll' | 'scrollEventThrottle'
2424
> &
2525
BottomSheetScrollableProps & {

src/components/bottomSheetScrollable/types.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type {
1616
View,
1717
VirtualizedListProps,
1818
} from 'react-native';
19-
import type Animated from 'react-native-reanimated';
19+
import type { AnimatedProps } from 'react-native-reanimated';
2020
import type { ScrollEventsHandlersHookType } from '../../types';
2121

2222
export interface BottomSheetScrollableProps {
@@ -56,7 +56,7 @@ export type ScrollableProps<T> =
5656

5757
//#region FlatList
5858
export type BottomSheetFlatListProps<T> = Omit<
59-
Animated.AnimateProps<FlatListProps<T>>,
59+
AnimatedProps<FlatListProps<T>>,
6060
'decelerationRate' | 'onScroll' | 'scrollEventThrottle'
6161
> &
6262
BottomSheetScrollableProps & {
@@ -136,7 +136,7 @@ export interface BottomSheetFlatListMethods {
136136

137137
//#region ScrollView
138138
export type BottomSheetScrollViewProps = Omit<
139-
Animated.AnimateProps<ScrollViewProps>,
139+
AnimatedProps<ScrollViewProps>,
140140
'decelerationRate' | 'scrollEventThrottle'
141141
> &
142142
BottomSheetScrollableProps & {
@@ -202,7 +202,7 @@ export interface BottomSheetScrollViewMethods {
202202

203203
//#region SectionList
204204
export type BottomSheetSectionListProps<ItemT, SectionT> = Omit<
205-
Animated.AnimateProps<SectionListProps<ItemT, SectionT>>,
205+
AnimatedProps<SectionListProps<ItemT, SectionT>>,
206206
'decelerationRate' | 'scrollEventThrottle'
207207
> &
208208
BottomSheetScrollableProps & {
@@ -245,7 +245,7 @@ export interface BottomSheetSectionListMethods {
245245

246246
//#region
247247
export type BottomSheetVirtualizedListProps<T> = Omit<
248-
Animated.AnimateProps<VirtualizedListProps<T>>,
248+
AnimatedProps<VirtualizedListProps<T>>,
249249
'decelerationRate' | 'scrollEventThrottle'
250250
> &
251251
BottomSheetScrollableProps & {

0 commit comments

Comments
 (0)