diff --git a/src/Main.tsx b/src/Main.tsx
index b5fd7f2..abca3d9 100644
--- a/src/Main.tsx
+++ b/src/Main.tsx
@@ -282,7 +282,7 @@ const Main = () => {
{step == Step.Discovery && }
{step == Step.Initialization && }
{step == Step.Loading && }
- {step == Step.Authentication && }
+ {step == Step.Authentication && }
{step == Step.Home && }
{step == Step.FactoryReset && }
diff --git a/src/NFCModal.tsx b/src/NFCModal.tsx
index 513c412..0199def 100644
--- a/src/NFCModal.tsx
+++ b/src/NFCModal.tsx
@@ -21,7 +21,9 @@ const NFCModal: FC = props => {
Tap your Keycard
-
+
+
+
)};
diff --git a/src/Styles.tsx b/src/Styles.tsx
index e1fe4cc..083a4c3 100644
--- a/src/Styles.tsx
+++ b/src/Styles.tsx
@@ -95,6 +95,12 @@ const Styles = StyleSheet.create({
},
modalIcon: {
color: '#F29AE9'
+ },
+ navContainer: {
+ flexDirection: 'row',
+ width: '95%',
+ marginLeft: '2.5%',
+ marginRight: '2.55%'
}
});
diff --git a/src/components/Button.tsx b/src/components/Button.tsx
index 4a1ffd2..fed4524 100644
--- a/src/components/Button.tsx
+++ b/src/components/Button.tsx
@@ -1,42 +1,77 @@
import {FC } from "react";
-import { DimensionValue, StyleSheet, Text, TouchableOpacity, View } from "react-native";
+import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
+import Icon from 'react-native-vector-icons/Feather';
type ButtonProps = {
- label: string;
+ label?: string;
disabled: boolean;
+ type?: string;
onChangeFunc: () => void;
};
const Button: FC = props => {
- const {label, disabled, onChangeFunc} = props;
+ const {label, disabled, type = "primary", onChangeFunc} = props;
+
+ const textContainer = () => {
+ if(type == 'cancel') {
+ return style.cancelBtnContainer;
+ } else {
+ return style.primarytBtnContainer;
+ }
+ }
return (
-
-
- {label}
+
+
+ {type == "cancel" && }
+ {type == "primary" && {label}}
+ {type == "secondary" && {label}}
)};
-const buttonStyle = StyleSheet.create({
- textBtnContainer: {
+const style = StyleSheet.create({
+ primarytBtnContainer: {
flexDirection: 'row',
textAlign: 'center',
justifyContent: 'center',
backgroundColor: 'white',
- width: '90%',
marginLeft: '5%',
marginRight: '5%',
+ height: 62,
+ flexGrow: 1,
+ flexShrink: 0,
+ flexBasis: 'auto'
+ },
+ cancelBtnContainer: {
+ textAlign: 'center',
+ justifyContent: 'center',
paddingTop: 15,
- paddingBottom: 15
+ paddingBottom: 15,
+ borderWidth: 1,
+ borderColor: 'white',
+ width: 62,
+ height: 62,
+ flexGrow: 0,
+ flexShrink: 1,
+ flexBasis: 62
},
button: {
+ justifyContent: 'center'
},
- title: {
+ primaryText: {
color: "black",
fontFamily: 'Inter',
+ fontSize: 14,
+ },
+ secondaryText: {
+ color: 'white',
+ fontFamily: 'Inter',
fontSize: 14
},
+ cancelIcon: {
+ textAlign: 'center'
+ }
});
export default Button;
\ No newline at end of file
diff --git a/src/components/Dialpad.tsx b/src/components/Dialpad.tsx
index 370dfe0..95e1179 100644
--- a/src/components/Dialpad.tsx
+++ b/src/components/Dialpad.tsx
@@ -3,6 +3,7 @@ import React, {FC, useState } from "react";
import DialpadKeypad from "./DialpadKeypad";
import Button from "./Button";
import DialpadPin from "./DialpadPin";
+import Styles from "../Styles";
const { width } = Dimensions.get("window");
@@ -21,8 +22,7 @@ const Dialpad: FC = props => {
const [code, setCode] = useState([]);
const [wrongRepeat, setWrongRepeat] = useState(false);
const pinLength = 6;
- const pinContainerSize = width / 2;
- const pinSize = (pinContainerSize / pinLength) + 8;
+ const pinSize = 14;
const updateCode = (item: never) => {
if (item === "X") {
@@ -41,59 +41,36 @@ const Dialpad: FC = props => {
}
return (
-
+
- {prompt}
- Enter your secure six-digit code
+ {prompt}
{pinRetryCounter >= 0 && Remaining attempts: {pinRetryCounter}}
{wrongRepeat && The PINs do not match}
-
+
-
-
-
+
+
+
+
+
)};
const styles = StyleSheet.create({
- container: {
- backgroundColor: "#222222",
- height: '100%',
- },
textContainer: {
justifyContent: "center",
alignItems: "center",
- marginTop: 30,
+ marginTop: 60,
position: "relative",
},
- pinText: {
- fontSize: 28,
- fontFamily: 'Inter',
- color: "white",
- },
- pinSubText: {
- fontSize: 18,
- fontFamily: 'Inter',
- color: "white",
- marginVertical: 30,
- },
-
pinAttempts: {
- fontSize: 18,
+ fontSize: 14,
fontFamily: 'Inter',
color: "white",
- marginTop: -10,
- marginBottom: 30
- },
- btnContainer: {
- flexDirection: 'row',
- width: '74%',
- marginLeft: '13%',
- marginRight: '13%',
- alignItems: 'center'
+ marginTop: 10
}
- });
+});
export default Dialpad;
\ No newline at end of file
diff --git a/src/components/DialpadKeypad.tsx b/src/components/DialpadKeypad.tsx
index 07b0276..0f2a7bf 100644
--- a/src/components/DialpadKeypad.tsx
+++ b/src/components/DialpadKeypad.tsx
@@ -6,12 +6,11 @@ type DialpadKeypadProps = {
dialPadContent: any[];
dialPadSize: number;
dialPadTextSize: number;
- code: number[];
updateCodeFunc: (item: never) => void;
};
const DialpadKeypad: FC = props => {
- const {dialPadContent, dialPadSize, dialPadTextSize, code, updateCodeFunc} = props;
+ const {dialPadContent, dialPadSize, dialPadTextSize, updateCodeFunc} = props;
return (
index.toString()} renderItem={({ item }) => {
@@ -19,7 +18,7 @@ const DialpadKeypad: FC = props => {
updateCodeFunc(item as never)}>
= props => {
height: pinSize,
borderRadius: pinSize / 2,
overflow: "hidden",
- margin: 5,
+ margin: 8,
}}
>
{isSelected && ( = props => {
const styles = StyleSheet.create({
dialPadPinContainer: {
flexDirection: "row",
- marginBottom: 25,
+ marginTop: 30,
+ marginBottom: 50,
alignItems: "flex-end",
},
pinContentContainer: {
flex: 1,
- backgroundColor: "#ffffff11",
borderWidth: 1,
justifyContent: "center",
alignItems: "center",
},
pinContent: {
- backgroundColor: "#199515",
+ backgroundColor: "white",
}
});
diff --git a/src/components/steps/InitializationScreen.tsx b/src/components/steps/InitializationScreen.tsx
index c9ef62b..80f1c5e 100644
--- a/src/components/steps/InitializationScreen.tsx
+++ b/src/components/steps/InitializationScreen.tsx
@@ -35,8 +35,8 @@ const InitializationScreen: FC = props => {
return (
- { step == PinSteps.InsertPin && }
- { step == PinSteps.RepeatPin && setStep(PinSteps.InsertPin)} onNextFunc={submitPin}> }
+ { step == PinSteps.InsertPin && }
+ { step == PinSteps.RepeatPin && setStep(PinSteps.InsertPin)} onNextFunc={submitPin}> }
)};