react-native-device-helpers
v0.0.1
Published
A library of little helpers for device specific code in your React Native App
Downloads
3
Maintainers
Readme
react-native-device-helpers
A library of little helpers for device specific code in your React Native App.
Getting Started
Using
nvm
is highly recommended as to manage different Node versions
npm i react-native-device-helpers --save
Example
// in component.style.js
import { StyleSheet } from 'react-native';
import { ifIphoneX } from 'react-native-device-helpers'
export default StyleSheet.create({
header:{
height: 120,
width: 60,
...ifIphoneX({
paddingTop: 50
}, {
paddingTop: 20
})
},
});