UNPKG

react-native-image-layout

Version:

An easy and simple to use React Native component to render a custom masonry layout for remote/local images and displayed on a custom interactive image viewer. Includes animations and support for both iOS and Android. Free and made possible along with co

14 lines (12 loc) 393 B
import { Platform, Dimensions } from "react-native"; export function isIPhoneX() { const X_WIDTH = 375; const X_HEIGHT = 812; return ( Platform.OS === "ios" && ((Dimensions.get("window").height === X_HEIGHT && Dimensions.get("window").width === X_WIDTH) || (Dimensions.get("window").height === X_WIDTH && Dimensions.get("window").width === X_HEIGHT)) ); }