{"_id":"react-native-iphone-x-helper","_rev":"358982","name":"react-native-iphone-x-helper","description":"A library to help you design your react-native app for the iPhone X","dist-tags":{"latest":"1.3.1"},"maintainers":[{"name":"ptelad","email":"ptelad@gmail.com"}],"time":{"modified":"2021-07-13T08:43:52.000Z","created":"2017-09-17T07:57:01.367Z","1.3.1":"2020-11-08T09:08:22.914Z","1.3.0":"2020-10-15T09:56:08.596Z","1.2.1":"2019-05-29T13:20:24.332Z","1.2.0":"2018-09-27T07:31:33.092Z","1.1.0":"2018-09-05T10:58:51.406Z","1.0.3":"2018-05-09T08:34:55.914Z","1.0.2":"2018-01-10T09:32:54.362Z","1.0.1":"2017-09-17T08:02:48.503Z","1.0.0":"2017-09-17T07:57:01.367Z"},"users":{"theaklair":true},"author":{"name":"Elad Gil"},"repository":{"type":"git","url":"git+https://github.com/ptelad/react-native-iphone-x-helper.git"},"versions":{"1.3.1":{"name":"react-native-iphone-x-helper","version":"1.3.1","description":"A library to help you design your react-native app for the iPhone X","main":"index.js","types":"index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ptelad/react-native-iphone-x-helper.git"},"keywords":["react-native","ios","iphone-x","iphoneX","stylesheet"],"author":{"name":"Elad Gil"},"license":"MIT","bugs":{"url":"https://github.com/ptelad/react-native-iphone-x-helper/issues"},"homepage":"https://github.com/ptelad/react-native-iphone-x-helper#readme","peerDependencies":{"react-native":">=0.42.0"},"gitHead":"1519e33468950a04316c6166b1e50b8b8d89baa3","_id":"react-native-iphone-x-helper@1.3.1","_nodeVersion":"10.16.2","_npmVersion":"6.13.1","dist":{"shasum":"20c603e9a0e765fd6f97396638bdeb0e5a60b010","size":2356,"noattachment":false,"key":"/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-native-iphone-x-helper/download/react-native-iphone-x-helper-1.3.1.tgz"},"_npmUser":{"name":"ptelad","email":"ptelad@gmail.com"},"directories":{},"maintainers":[{"name":"ptelad","email":"ptelad@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-iphone-x-helper_1.3.1_1604826502778_0.8008196285775822"},"_hasShrinkwrap":false,"publish_time":1604826502914,"_cnpm_publish_time":1604826502914},"1.3.0":{"name":"react-native-iphone-x-helper","version":"1.3.0","description":"A library to help you design your react-native app for the iPhone X","main":"index.js","types":"index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ptelad/react-native-iphone-x-helper.git"},"keywords":["react-native","ios","iphone-x","iphoneX","stylesheet"],"author":{"name":"Elad Gil"},"license":"MIT","bugs":{"url":"https://github.com/ptelad/react-native-iphone-x-helper/issues"},"homepage":"https://github.com/ptelad/react-native-iphone-x-helper#readme","peerDependencies":{"react-native":">=0.42.0"},"gitHead":"c96bd4a0bcaaf5c713a0d985060632b991cce12a","_id":"react-native-iphone-x-helper@1.3.0","_nodeVersion":"10.16.2","_npmVersion":"6.13.1","dist":{"shasum":"84fd13e6b89cc3aa4daa80ec514bf15cb724d86d","size":2349,"noattachment":false,"key":"/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-native-iphone-x-helper/download/react-native-iphone-x-helper-1.3.0.tgz"},"maintainers":[{"name":"ptelad","email":"ptelad@gmail.com"}],"_npmUser":{"name":"ptelad","email":"ptelad@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-iphone-x-helper_1.3.0_1602755768483_0.614973566355244"},"_hasShrinkwrap":false,"publish_time":1602755768596,"_cnpm_publish_time":1602755768596},"1.2.1":{"name":"react-native-iphone-x-helper","version":"1.2.1","description":"A library to help you design your react-native app for the iPhone X","main":"index.js","types":"index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ptelad/react-native-iphone-x-helper.git"},"keywords":["react-native","ios","iphone-x","iphoneX","stylesheet"],"author":{"name":"Elad Gil"},"license":"MIT","bugs":{"url":"https://github.com/ptelad/react-native-iphone-x-helper/issues"},"homepage":"https://github.com/ptelad/react-native-iphone-x-helper#readme","peerDependencies":{"react-native":">=0.42.0"},"gitHead":"b5f410b9c1966a1c0839217fbe397e5b26ce450b","_id":"react-native-iphone-x-helper@1.2.1","_npmVersion":"6.4.1","_nodeVersion":"8.15.1","_npmUser":{"name":"ptelad","email":"ptelad@gmail.com"},"dist":{"shasum":"645e2ffbbb49e80844bb4cbbe34a126fda1e6772","size":2323,"noattachment":false,"key":"/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-native-iphone-x-helper/download/react-native-iphone-x-helper-1.2.1.tgz"},"maintainers":[{"name":"ptelad","email":"ptelad@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-iphone-x-helper_1.2.1_1559136024227_0.5417734624398354"},"_hasShrinkwrap":false,"publish_time":1559136024332,"_cnpm_publish_time":1559136024332},"1.2.0":{"name":"react-native-iphone-x-helper","version":"1.2.0","description":"A library to help you design your react-native app for the iPhone X","main":"index.js","types":"index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ptelad/react-native-iphone-x-helper.git"},"keywords":["react-native","ios","iphone-x","iphoneX","stylesheet"],"author":{"name":"Elad Gil"},"license":"MIT","bugs":{"url":"https://github.com/ptelad/react-native-iphone-x-helper/issues"},"homepage":"https://github.com/ptelad/react-native-iphone-x-helper#readme","peerDependencies":{"react-native":">=0.42.0"},"gitHead":"da1cb84e89053c40a2ae4db53bd1fdec4ea0331f","_id":"react-native-iphone-x-helper@1.2.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"ptelad","email":"ptelad@gmail.com"},"dist":{"shasum":"9f8a376eb00bc712115abff4420318a0063fa796","size":2279,"noattachment":false,"key":"/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-native-iphone-x-helper/download/react-native-iphone-x-helper-1.2.0.tgz"},"maintainers":[{"name":"ptelad","email":"ptelad@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-iphone-x-helper_1.2.0_1538033492970_0.15514402546989547"},"_hasShrinkwrap":false,"publish_time":1538033493092,"_cnpm_publish_time":1538033493092},"1.1.0":{"name":"react-native-iphone-x-helper","version":"1.1.0","description":"A library to help you design your react-native app for the iPhone X","main":"index.js","types":"index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ptelad/react-native-iphone-x-helper.git"},"keywords":["react-native","ios","iphone-x","iphoneX","stylesheet"],"author":{"name":"Elad Gil"},"license":"MIT","bugs":{"url":"https://github.com/ptelad/react-native-iphone-x-helper/issues"},"homepage":"https://github.com/ptelad/react-native-iphone-x-helper#readme","peerDependencies":{"react-native":">=0.42.0"},"gitHead":"bde4dab641b344444e1f006f87ea057c51692d2d","_id":"react-native-iphone-x-helper@1.1.0","_npmVersion":"5.8.0","_nodeVersion":"8.11.1","_npmUser":{"name":"ptelad","email":"ptelad@gmail.com"},"dist":{"shasum":"3a881720900bd8d1c67de2c465ea9aa9296180a7","size":2253,"noattachment":false,"key":"/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-native-iphone-x-helper/download/react-native-iphone-x-helper-1.1.0.tgz"},"maintainers":[{"name":"ptelad","email":"ptelad@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-iphone-x-helper_1.1.0_1536145131297_0.9296684706534448"},"_hasShrinkwrap":false,"publish_time":1536145131406,"_cnpm_publish_time":1536145131406},"1.0.3":{"name":"react-native-iphone-x-helper","version":"1.0.3","description":"A library to help you design your react-native app for the iPhone X","main":"index.js","types":"index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ptelad/react-native-iphone-x-helper.git"},"keywords":["react-native","ios","iphone-x","iphoneX","stylesheet"],"author":{"name":"Elad Gil"},"license":"MIT","bugs":{"url":"https://github.com/ptelad/react-native-iphone-x-helper/issues"},"homepage":"https://github.com/ptelad/react-native-iphone-x-helper#readme","peerDependencies":{"react-native":">=0.42.0"},"gitHead":"3c919346769e3cb9315a5254d43fcad1aadee777","_id":"react-native-iphone-x-helper@1.0.3","_npmVersion":"5.8.0","_nodeVersion":"8.11.1","_npmUser":{"name":"ptelad","email":"ptelad@gmail.com"},"dist":{"shasum":"7a2f1e0574e899a0f1d426e6167fd98990083214","size":2151,"noattachment":false,"key":"/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-native-iphone-x-helper/download/react-native-iphone-x-helper-1.0.3.tgz"},"maintainers":[{"name":"ptelad","email":"ptelad@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-iphone-x-helper_1.0.3_1525854895811_0.7087260749401445"},"_hasShrinkwrap":false,"publish_time":1525854895914,"_cnpm_publish_time":1525854895914},"1.0.2":{"name":"react-native-iphone-x-helper","version":"1.0.2","description":"A library to help you design your react-native app for the iPhone X","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ptelad/react-native-iphone-x-helper.git"},"keywords":["react-native","ios","iphone-x","iphoneX","stylesheet"],"author":{"name":"Elad Gil"},"license":"MIT","bugs":{"url":"https://github.com/ptelad/react-native-iphone-x-helper/issues"},"homepage":"https://github.com/ptelad/react-native-iphone-x-helper#readme","peerDependencies":{"react-native":">=0.42.0"},"gitHead":"38d42856dfdc22c16a19122fc8b67018c6d069a6","_id":"react-native-iphone-x-helper@1.0.2","_npmVersion":"5.5.1","_nodeVersion":"6.11.2","_npmUser":{"name":"ptelad","email":"ptelad@gmail.com"},"dist":{"shasum":"7dbca530930f7c1ce8633cc8fd13ba94102992e1","size":1794,"noattachment":false,"key":"/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-native-iphone-x-helper/download/react-native-iphone-x-helper-1.0.2.tgz"},"maintainers":[{"name":"ptelad","email":"ptelad@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-iphone-x-helper-1.0.2.tgz_1515576773452_0.7487120199948549"},"directories":{},"publish_time":1515576774362,"_hasShrinkwrap":false,"_cnpm_publish_time":1515576774362},"1.0.1":{"name":"react-native-iphone-x-helper","version":"1.0.1","description":"A library to help you design your react-native app for the iPhone X","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ptelad/react-native-iphone-x-helper.git"},"keywords":["react-native","ios","iphone-x","iphoneX","stylesheet"],"author":{"name":"Elad Gil"},"license":"MIT","bugs":{"url":"https://github.com/ptelad/react-native-iphone-x-helper/issues"},"homepage":"https://github.com/ptelad/react-native-iphone-x-helper#readme","peerDependencies":{"react-native":">=0.42.0"},"gitHead":"5dce1d7aae98cc02714f348e01003a2d9b4f289a","_id":"react-native-iphone-x-helper@1.0.1","_npmVersion":"5.3.0","_nodeVersion":"6.11.2","_npmUser":{"name":"ptelad","email":"ptelad@gmail.com"},"dist":{"shasum":"950dbdaca66f458689a7e9697c5beb9bd53f98f2","size":1837,"noattachment":false,"key":"/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-native-iphone-x-helper/download/react-native-iphone-x-helper-1.0.1.tgz"},"maintainers":[{"name":"ptelad","email":"ptelad@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-iphone-x-helper-1.0.1.tgz_1505635367513_0.28465537494048476"},"directories":{},"publish_time":1505635368503,"_hasShrinkwrap":false,"_cnpm_publish_time":1505635368503},"1.0.0":{"name":"react-native-iphone-x-helper","version":"1.0.0","description":"A library to help you design your react-native app for the iPhone X","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ptelad/react-native-iphone-x-helper.git"},"keywords":["react-native","ios","iphone-x","iphoneX","stylesheet"],"author":{"name":"Elad Gil"},"license":"MIT","bugs":{"url":"https://github.com/ptelad/react-native-iphone-x-helper/issues"},"homepage":"https://github.com/ptelad/react-native-iphone-x-helper#readme","peerDependencies":{"react-native":">=0.42.0"},"gitHead":"c02c08fb39f7854e774bf8edb36213e3c6560d36","_id":"react-native-iphone-x-helper@1.0.0","_npmVersion":"5.3.0","_nodeVersion":"6.11.2","_npmUser":{"name":"ptelad","email":"ptelad@gmail.com"},"dist":{"shasum":"a2e5445237b2b9e7b80cb068eaf84d74610d1960","size":1811,"noattachment":false,"key":"/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-native-iphone-x-helper/download/react-native-iphone-x-helper-1.0.0.tgz"},"maintainers":[{"name":"ptelad","email":"ptelad@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-iphone-x-helper-1.0.0.tgz_1505635020367_0.9097550292499363"},"directories":{},"publish_time":1505635021367,"_hasShrinkwrap":false,"_cnpm_publish_time":1505635021367}},"readme":"[![npm version](https://badge.fury.io/js/react-native-iphone-x-helper.svg)](https://badge.fury.io/js/react-native-iphone-x-helper)\n\n# react-native-iphone-x-helper\nA library to help you design your react-native app for notched iPhones.\n\n## Installing ##\n`npm i react-native-iphone-x-helper --save`\n\n## API ##\n\n### ifIphoneX(iphoneXStyle, \\[regularStyle\\]) ###\nthis method it for creating stylesheets with the iPhone X in mind\n\n#### Parameters ####\n**iphoneXStyle** - the style to apply if you're on iPhone X\n\n**regularStyle (*optional*)** - the style to apply if you're not on iPhone X\n\n#### Example ####\n```js\n// in style.js\n\nimport { StyleSheet } from 'react-native';\nimport { ifIphoneX } from 'react-native-iphone-x-helper'\n\nexport default StyleSheet.create({\n    header:{\n        position: 'absolute',\n        top: 0,\n        left: 0,\n        right: 0,\n        padding:10,\n        height: 60,\n        backgroundColor: 'transparent',\n        ...ifIphoneX({\n            paddingTop: 50\n        }, {\n            paddingTop: 20\n        })\n    },\n});\n```\n\n### isIphoneX() ###\n\n**returns** - `true` if you running on an iPhone X.\n\n#### Example ####\n```js\nimport { isIphoneX } from 'react-native-iphone-x-helper'\n\n// ...\n\nif (isIphoneX()) {\n    // do this...\n} else {\n    // do that...\n}\n```\n\n### getStatusBarHeight([safe]) ###\n\n#### Parameters ####\n**safe** - whether you want for get safe area height or not\n\n**returns** - the height of the status bar: `44` for safe iPhoneX, `30` for unsafe iPhoneX, `20` for other iOS devices and `StatusBar.currentHeight` for Android.\n\n#### Example ####\n\n```js\n// in style.js\n\nimport { StyleSheet } from 'react-native';\nimport { getStatusBarHeight } from 'react-native-iphone-x-helper'\n\nexport default StyleSheet.create({\n    header:{\n        position: 'absolute',\n        top: 0,\n        left: 0,\n        right: 0,\n        padding:10,\n        height: 60,\n        backgroundColor: 'transparent',\n        paddingTop: getStatusBarHeight()\n    },\n});\n```\n\n***NOTE:*** If your using the the unsafe statusbar height, make sure to add 14dp of padding to your content, otherwise it's going to be flush against the notch\n\n### getBottomSpace ###\n\n**returns** - the height of the bottom to fit the safe area: `34` for iPhone X and `0` for other devices.\n\n#### Example ####\n\n```js\n// in style.js\n\nimport { StyleSheet } from 'react-native';\nimport { getBottomSpace } from 'react-native-iphone-x-helper'\n\nexport default StyleSheet.create({\n    totalview: {\n        flex: 1,\n        backgroundColor: 'transparent',\n        marginBottom: getBottomSpace()\n    },\n});\n```\n\n## Licence ##\n**MIT**\n","_attachments":{},"homepage":"https://github.com/ptelad/react-native-iphone-x-helper#readme","bugs":{"url":"https://github.com/ptelad/react-native-iphone-x-helper/issues"},"license":"MIT"}