INNER CODE UNIT · JavaScript

positionStyle

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

export function positionStyle(style, position) {
  if (typeof position === "string") {
    return [
      style,
      position === "top" && styles.rootTop,
      position === "bottom" && styles.rootBottom,
      position === "center" && styles.rootCenter,
    ];
  }

  return [style, position];
}

/**
 * Global function to handle show messages that can be called anywhere in your app
 * Pass some `message` object as first attribute to display flash messages in your app
 *
 * ```

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…