Skip to content

Commit 5af3e80

Browse files
committed
fix: replaced deprecated reanimated Extrapolate with Extrapolation (#1875)(by @cenksari)
1 parent d8d34fa commit 5af3e80

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

example/src/components/customFooter/CustomFooter.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from '@gorhom/bottom-sheet';
88
import { useSafeAreaInsets } from 'react-native-safe-area-context';
99
import Animated, {
10-
Extrapolate,
10+
Extrapolation,
1111
interpolate,
1212
useAnimatedStyle,
1313
} from 'react-native-reanimated';
@@ -31,7 +31,7 @@ const CustomFooterComponent = ({
3131
animatedIndex.value,
3232
[0, 1],
3333
[toRad(0), toRad(-180)],
34-
Extrapolate.CLAMP
34+
Extrapolation.CLAMP
3535
);
3636
return {
3737
transform: [{ rotate: `${arrowRotate}rad` }],
@@ -47,7 +47,7 @@ const CustomFooterComponent = ({
4747
animatedIndex.value,
4848
[-0.85, 0],
4949
[0, 1],
50-
Extrapolate.CLAMP
50+
Extrapolation.CLAMP
5151
),
5252
}),
5353
[animatedIndex]

example/src/components/customHandle/CustomHandle.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { memo, useMemo } from 'react';
22
import { StyleProp, StyleSheet, Text, ViewStyle } from 'react-native';
33
import { BottomSheetHandleProps } from '@gorhom/bottom-sheet';
44
import Animated, {
5-
Extrapolate,
5+
Extrapolation,
66
interpolate,
77
useAnimatedStyle,
88
useDerivedValue,
@@ -28,7 +28,7 @@ const CustomHandleComponent: React.FC<CustomHandleProps> = ({
2828
animatedIndex.value,
2929
[0, 1, 2],
3030
[-1, 0, 1],
31-
Extrapolate.CLAMP
31+
Extrapolation.CLAMP
3232
),
3333
[animatedIndex.value]
3434
);
@@ -41,7 +41,7 @@ const CustomHandleComponent: React.FC<CustomHandleProps> = ({
4141
animatedIndex.value,
4242
[1, 2],
4343
[20, 0],
44-
Extrapolate.CLAMP
44+
Extrapolation.CLAMP
4545
);
4646
return {
4747
borderTopLeftRadius: borderTopRadius,
@@ -60,7 +60,7 @@ const CustomHandleComponent: React.FC<CustomHandleProps> = ({
6060
animatedIndex.value,
6161
[0, 1, 2],
6262
[toRad(-30), 0, toRad(30)],
63-
Extrapolate.CLAMP
63+
Extrapolation.CLAMP
6464
);
6565
return {
6666
transform: transformOrigin(
@@ -86,7 +86,7 @@ const CustomHandleComponent: React.FC<CustomHandleProps> = ({
8686
animatedIndex.value,
8787
[0, 1, 2],
8888
[toRad(30), 0, toRad(-30)],
89-
Extrapolate.CLAMP
89+
Extrapolation.CLAMP
9090
);
9191
return {
9292
transform: transformOrigin(

example/src/screens/integrations/map/Weather.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useCallback, useMemo, useState } from 'react';
22
import { LayoutChangeEvent, StyleSheet } from 'react-native';
33
import Animated, {
4-
Extrapolate,
4+
Extrapolation,
55
interpolate,
66
useAnimatedStyle,
77
} from 'react-native-reanimated';
@@ -44,7 +44,7 @@ const Weather = ({ animatedIndex, animatedPosition }: WeatherProps) => {
4444
animatedIndex.value,
4545
[1, 1.125],
4646
[1, 0],
47-
Extrapolate.CLAMP
47+
Extrapolation.CLAMP
4848
),
4949
transform: [
5050
{

src/components/bottomSheet/BottomSheet.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Animated, {
1515
useDerivedValue,
1616
runOnJS,
1717
interpolate,
18-
Extrapolate,
18+
Extrapolation,
1919
runOnUI,
2020
cancelAnimation,
2121
useWorkletCallback,
@@ -501,7 +501,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
501501
animatedPosition.value,
502502
adjustedSnapPoints,
503503
adjustedSnapPointsIndexes,
504-
Extrapolate.CLAMP
504+
Extrapolation.CLAMP
505505
)
506506
: -1;
507507

0 commit comments

Comments
 (0)