We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 452aec0 commit c370a7cCopy full SHA for c370a7c
src/create-interpolation.ts
@@ -7,7 +7,18 @@ type ColorInterpolateFunction = (input: number) => string
7
function createInterpolation(
8
config: Animated.InterpolationConfigType
9
): ColorInterpolateFunction {
10
- return AnimatedInterpolation.__createInterpolation(config)
+ if (AnimatedInterpolation.__createInterpolation) {
11
+ return AnimatedInterpolation.__createInterpolation(config)
12
+ }
13
+
14
+ return (input) => {
15
+ const interpolation = new AnimatedInterpolation(
16
+ { __getValue: () => input },
17
+ config
18
+ )
19
20
+ return interpolation.__getValue()
21
22
}
23
24
export { createInterpolation }
0 commit comments