22 lines
741 B
React
22 lines
741 B
React
// Metro module 1748 (f1749).
|
|
import { ScrollView } from "react-native";
|
|
import { createAnimatedComponent } from "./Module1640";
|
|
import { componentWithRef } from "./Module1745";
|
|
import { useAnimatedRef, useScrollViewOffset } from "./Module1749";
|
|
const _excluded = ["scrollViewOffset"];
|
|
const AnimatedComponent = createAnimatedComponent(ScrollView);
|
|
export const AnimatedScrollView = componentWithRef((a0, a1) => {
|
|
let ref = a1;
|
|
const { scrollViewOffset, ...rest } = a0;
|
|
if (a1 === null) {
|
|
ref = useAnimatedRef();
|
|
}
|
|
if (scrollViewOffset) {
|
|
useScrollViewOffset(ref, scrollViewOffset);
|
|
}
|
|
if (!("scrollEventThrottle" in rest)) {
|
|
rest.scrollEventThrottle = 1;
|
|
}
|
|
return <AnimatedComponent ref={ref} {...rest} />;
|
|
});
|