Skip to content

Commit

Permalink
iPhone: Smaller device design bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathChaos committed Dec 16, 2019
1 parent e3bfbb5 commit e2317f6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
29 changes: 17 additions & 12 deletions lib/src/LoginScreen.style.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { Dimensions, StyleSheet } from "react-native";

const { width, height } = Dimensions.get("window");
import { StyleSheet } from "react-native";
import {
isAndroid,
ScreenWidth,
ScreenHeight,
isIPhoneXFamily
} from "@freakycoder/react-native-helpers";

export const container = loginButtonBackgroundColor => {
return {
width,
height,
marginBottom: 32,
width: ScreenWidth,
height: ScreenHeight,
backgroundColor: loginButtonBackgroundColor
};
};
Expand All @@ -15,26 +19,27 @@ export default {
loginButtonStyle: {
left: 0,
right: 0,
bottom: 24,
height: 50,
position: "absolute",
alignItems: "center",
justifyContent: "center"
justifyContent: "center",
bottom: isAndroid ? 32 : isIPhoneXFamily() ? 32 : ScreenHeight * 0.01
},
loginButtonTextStyle: {
color: "white",
fontSize: 15
fontSize: 15,
fontFamily: "Montserrat-Bold"
},
imagebackgroundStyle: {
width,
flex: 1,
zIndex: -1,
height: height * 0.9,
width: ScreenWidth,
height: ScreenHeight * 0.9,
...StyleSheet.absoluteFillObject
},
blackoverlay: {
width,
height,
width: ScreenWidth,
height: ScreenHeight,
backgroundColor: "rgba(0,0,0,0.1)"
},
safeAreaViewStyle: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-login-screen",
"version": "0.2.4",
"version": "0.2.5",
"description": "Fully Customizable & Ready to use Login Screen for React Native",
"keywords": [
"login",
Expand Down

0 comments on commit e2317f6

Please sign in to comment.