diff --git a/src/components/containers/FadingView.tsx b/src/components/containers/FadingView.tsx
index 41425c1..574a5e4 100644
--- a/src/components/containers/FadingView.tsx
+++ b/src/components/containers/FadingView.tsx
@@ -45,13 +45,14 @@ const FadingView = forwardRef(
children,
style,
opacity,
- animatedProps = {},
+ // Remove animatedProps from rest to avoid passing stale/spread values
+ animatedProps: _externalAnimatedProps,
opacityThresholdToEnablePointerEvents = 1,
...rest
},
ref
) => {
- const _animatedProps = useAnimatedProps(() => {
+ const animatedProps = useAnimatedProps(() => {
const _pointerEvents: AnimatedViewPointerEvents =
opacity.value >= opacityThresholdToEnablePointerEvents ? 'auto' : 'none';
return { pointerEvents: _pointerEvents };
@@ -62,7 +63,7 @@ const FadingView = forwardRef(
{children}
diff --git a/src/components/containers/ScrollView.tsx b/src/components/containers/ScrollView.tsx
index 3610d5b..0139159 100644
--- a/src/components/containers/ScrollView.tsx
+++ b/src/components/containers/ScrollView.tsx
@@ -1,5 +1,5 @@
import React, { useImperativeHandle } from 'react';
-import { View, StyleSheet, ScrollView } from 'react-native';
+import { View, StyleSheet } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import Animated, { useAnimatedRef } from 'react-native-reanimated';
@@ -7,9 +7,7 @@ import FadingView from './FadingView';
import { useScrollContainerLogic } from './useScrollContainerLogic';
import type { SharedScrollContainerProps } from './types';
-const AnimatedScrollView = Animated.createAnimatedComponent(ScrollView);
-
-type AnimatedScrollViewProps = React.ComponentProps & {
+type AnimatedScrollViewProps = React.ComponentProps & {
children?: React.ReactNode;
};
@@ -91,7 +89,7 @@ const ScrollViewWithHeadersInputComp = (
]}
>
{!absoluteHeader && HeaderComponent({ showNavBar, scrollY })}
-
+
{absoluteHeader && (
diff --git a/src/components/headers/Header.tsx b/src/components/headers/Header.tsx
index 7e90f06..43f7ca7 100644
--- a/src/components/headers/Header.tsx
+++ b/src/components/headers/Header.tsx
@@ -1,6 +1,7 @@
import React, { useMemo } from 'react';
import { useWindowDimensions } from 'react-native';
-import { StyleSheet, View } from 'react-native';
+import { StyleSheet } from 'react-native';
+import Animated from 'react-native-reanimated';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { FadingView } from '../containers';
import { HeaderBottomBorder } from '../line';
@@ -41,10 +42,12 @@ const Header: React.FC = ({
const noHeaderLeftRight = !headerLeft && !headerRight;
return (
-
+
{SurfaceComponent && SurfaceComponent({ showNavBar })}
-
+
{headerLeftFadesIn ? (
= ({
{headerLeft}
) : (
- = ({
]}
>
{headerLeft}
-
+
)}
{headerCenter &&
@@ -79,9 +82,11 @@ const Header: React.FC = ({
{headerCenter}
) : (
-
+
{headerCenter}
-
+
))}
{headerRightFadesIn ? (
@@ -97,7 +102,7 @@ const Header: React.FC = ({
{headerRight}
) : (
- = ({
]}
>
{headerRight}
-
+
)}
-
+
{!noBottomBorder && (
= ({
borderWidth={borderWidth}
/>
)}
-
+
);
};
diff --git a/src/components/headers/LargeHeader.tsx b/src/components/headers/LargeHeader.tsx
index 7420cc4..37731c5 100644
--- a/src/components/headers/LargeHeader.tsx
+++ b/src/components/headers/LargeHeader.tsx
@@ -1,5 +1,6 @@
import React from 'react';
-import { StyleSheet, View } from 'react-native';
+import { StyleSheet } from 'react-native';
+import Animated from 'react-native-reanimated';
import type { LargeHeaderProps } from './types';
const LH_VERTICAL_PADDING = 6;
@@ -13,7 +14,7 @@ const LH_HORIZONTAL_PADDING = 12;
const LargeHeader: React.FC> = ({
headerStyle,
children,
-}) => {children};
+}) => {children};
export default LargeHeader;