This package was created with strong motivation for react-native-iphone-x-helper (author: ptelad)
yarn add react-native-iphone-se-helper
#or
npm install react-native-iphone-se-helper --save
returns whether the device is a iPhons SE or others
determines the size by dividing whether it is SE or not
import { isIphoneSE, concernSESize } from "react-native-iphone-se-helper";
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
alignItems: "center",
backgroundColor: "#F5FCFF"
},
welcome: {
fontSize: concernSESize(20, 11),
textAlign: "center",
margin: isIphoneSE() ? 5 : 10
},
instructions: {
textAlign: "center",
color: "#333333",
marginBottom: 5
}
});
MIT