Commit a0100bf2 authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

Se agregó un gradiente al fondo animado

parent cfd082d9
Loading
Loading
Loading
Loading
+10 −13
Original line number Diff line number Diff line
import { Animated, Image, View } from "react-native";
import { PlaceInfoEntity } from "../../domain/entities/place_info_entity";
import { useAnimatedSelectedIndex } from "../../hooks/useAnimatedSelectedIndex";
import { LinearGradient } from "expo-linear-gradient";
import { LIGHT_THEME } from "../constants/theme";

interface AnimatedBackgroundProps {
  imageUri?: string;
  backgroundImageAnimation: Animated.Value;
};
}

export const AnimatedBackground = ({ imageUri, backgroundImageAnimation }: AnimatedBackgroundProps) => {
export const AnimatedBackground = ({
  imageUri,
  backgroundImageAnimation,
}: AnimatedBackgroundProps) => {
  return (
    <Animated.View
      style={{
@@ -17,7 +22,7 @@ export const AnimatedBackground = ({ imageUri, backgroundImageAnimation }: Anima
        opacity: backgroundImageAnimation.interpolate({
          inputRange: [-300, 0],
          outputRange: [0, 1],
        })
        }),
      }}
    >
      <Image
@@ -38,14 +43,6 @@ export const AnimatedBackground = ({ imageUri, backgroundImageAnimation }: Anima
          }).start();
        }}
      />
      <View
        style={{
          position: "absolute",
          width: "100%",
          height: "100%",
          backgroundColor: "rgba(0, 0, 0, 0.4)",
        }}
      />
    </Animated.View>
  );
};