INNER CODE UNIT · JavaScript

FlashMessageTransition

lucasferreira/react-native-flash-message · src/FlashMessage.js:111

export function FlashMessageTransition(animValue, position = "top") {
  const opacity = animValue.interpolate({
    inputRange: [0, 1],
    outputRange: [0, 1],
  });

  if (position === "top") {
    const translateY = animValue.interpolate({
      inputRange: [0, 1],
      outputRange: [-OFFSET_HEIGHT, 0],
    });

    return {
      transform: [{ translateY }],
      opacity,
    };
  } else if (position === "bottom") {
    const translateY = animValue.interpolate({

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…