From 5432c10072ed0a3972189ca3657c630e098e0101 Mon Sep 17 00:00:00 2001 From: Amy Boyd Date: Wed, 2 May 2018 15:53:41 +0100 Subject: [PATCH] Export isIPhoneX() and isIPad(). --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 692ec69..2d31533 100644 --- a/index.js +++ b/index.js @@ -21,7 +21,7 @@ const { height: D_HEIGHT, width: D_WIDTH } = Dimensions.get('window'); const { PlatformConstants = {} } = NativeModules; const { minor = 0 } = PlatformConstants.reactNativeVersion || {}; -const isIPhoneX = (() => { +export const isIPhoneX = (() => { if (Platform.OS === 'web') return false; if (minor >= 50) { @@ -35,7 +35,7 @@ const isIPhoneX = (() => { ); })(); -const isIPad = (() => { +export const isIPad = (() => { if (Platform.OS !== 'ios' || isIPhoneX) return false; // if portrait and width is smaller than iPad width