Files
iNaturalistReactNative/src/components/SharedComponents/UploadStatus/FadeOutIcon.tsx
Amanda Bullington 2be121d1a8 Fade out MyObs checkmark without fading into ObsStatus (#2763)
* Don't fade into ObsStatus in MyObservations

* Update snapshot
2025-03-13 18:33:17 -07:00

31 lines
629 B
TypeScript

import { View } from "components/styledComponents";
import React, { ReactNode } from "react";
import Reanimated, {
Keyframe
} from "react-native-reanimated";
type Props = {
children: ReactNode;
uniqueKey: string;
}
const AnimatedView = Reanimated.createAnimatedComponent( View );
const keyframe = new Keyframe( {
0: { opacity: 0 },
40: { opacity: 1 },
100: { opacity: 0 }
} );
const FadeOutIcon = ( {
children,
uniqueKey
}: Props ) => (
<AnimatedView
entering={keyframe.duration( 2000 )}
testID={`UploadIcon.complete.${uniqueKey}`}
>
{children}
</AnimatedView>
);
export default FadeOutIcon;