MCPcopy
hub / github.com/mmazzarolo/react-native-modal-datetime-picker / isIphoneX

Function isIphoneX

src/utils.js:3–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { Dimensions, Platform } from "react-native";
2
3export const isIphoneX = () => {
4 const { height, width } = Dimensions.get("window");
5
6 return (
7 Platform.OS === "ios" &&
8 !Platform.isPad &&
9 !Platform.isTVOS &&
10 (height === 780 ||
11 width === 780 ||
12 height === 812 ||
13 width === 812 ||
14 height === 844 ||
15 width === 844 ||
16 height === 852 ||
17 width === 852 ||
18 height === 896 ||
19 width === 896 ||
20 height === 926 ||
21 width === 926 ||
22 height === 932 ||
23 width === 932)
24 );
25};

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…