-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from Safariblocks-LTD/JS015
separate screen, fix focus
- Loading branch information
Showing
6 changed files
with
251 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
|
||
import * as React from 'react'; | ||
import { | ||
StyleSheet, | ||
TextInput, | ||
View, | ||
Text, | ||
ScrollView, | ||
Image, | ||
Keyboard, | ||
TouchableOpacity, | ||
KeyboardAvoidingView, | ||
Card, | ||
Animated, | ||
SafeAreaView | ||
} from "react-native"; | ||
import { Icon } from 'react-native-elements'; | ||
import { Center, Stack, VStack, Divider, Heading, HStack } from "native-base"; | ||
import { StyleText, MyAppText, textStyles } from '../../components/common/appTexts'; | ||
import Loader from '../../components/loading' | ||
import { NormalButton } from '../../components/common'; | ||
import { | ||
styles | ||
} from './styles'; | ||
import SmoothPinCodeInput from 'react-native-smooth-pincode-input'; | ||
|
||
|
||
|
||
|
||
type navigation = { | ||
navigation: any | ||
} | ||
const { Value, Text: AnimatedText } = Animated; | ||
|
||
|
||
|
||
|
||
|
||
export const CreatePin = ({ navigation }: navigation) => { | ||
const [loading, setLoading] = React.useState<boolean>() | ||
const [code, setCode] = React.useState('') | ||
const [confirmCode, setConfirmCode] = React.useState('') | ||
|
||
const [value, setValue] = React.useState(''); | ||
|
||
|
||
const buttonPress = () => { | ||
|
||
} | ||
|
||
const styled = { | ||
heading: (scale) => { | ||
const fontSize = textStyles.fontSize * scale; | ||
|
||
return { | ||
lineHeight: fontSize * 1.4, | ||
marginBottom: 12, | ||
fontWeight: "bold", | ||
fontSize, | ||
}; | ||
} | ||
} | ||
return ( | ||
<ScrollView style={styles.container}> | ||
<Loader loading={loading} /> | ||
<VStack space={10} style={styles.root}> | ||
<VStack> | ||
<MyAppText style={styles.title}>Create Pin</MyAppText> | ||
<SmoothPinCodeInput | ||
containerStyle={styles.cellContainer} | ||
cellSpacing={40} | ||
cellStyle={styles.cell} | ||
// ref={pinInput} | ||
value={code} | ||
onTextChange={code => setCode(code)} | ||
onFulfill={() => console.log('Do something')} | ||
onBackspace={() => console.log('No more back.')} | ||
/> | ||
</VStack> | ||
<VStack> | ||
<MyAppText style={styles.title}>Confirm Pin</MyAppText> | ||
<SmoothPinCodeInput | ||
containerStyle={styles.cellContainer} | ||
cellSpacing={40} | ||
cellStyle={styles.cell} | ||
// ref={confirmPinInput} | ||
value={confirmCode} | ||
onTextChange={confirmCode => setConfirmCode(confirmCode)} | ||
onFulfill={() => console.log('Do something')} | ||
onBackspace={() => console.log('No more back.')} | ||
/> | ||
</VStack> | ||
<NormalButton title='Create Pin' clickHandler={buttonPress} style={styles.button} /> | ||
</VStack> | ||
</ScrollView> | ||
) | ||
} | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './component' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
import { StyleSheet } from "react-native"; | ||
|
||
|
||
export const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor:"#F2EDED" | ||
}, | ||
|
||
content: { | ||
width: "100%", | ||
height: "100%", | ||
backgroundColor: "#FFFFFF", | ||
justifyContent: "space-between", | ||
alignItems: "center", | ||
// borderWidth: 1 | ||
}, | ||
|
||
textbox: { | ||
marginTop: 30, | ||
alignItems: "center", | ||
width: "60%", | ||
justifyContent: "center", | ||
// borderWidth: 1 | ||
}, | ||
|
||
text: { | ||
fontFamily: "Roboto", | ||
fontSize: 30, | ||
fontWeight: "bold", | ||
fontStyle: "normal" | ||
}, | ||
|
||
main: { | ||
// borderWidth: 1, | ||
width: "100%", | ||
alignItems: "flex-start", | ||
paddingLeft: 30, | ||
justifyContent: "space-around", | ||
height: "30%", | ||
}, | ||
|
||
up: { | ||
display: "flex", | ||
flexDirection: "row", | ||
alignItems: "center", | ||
}, | ||
|
||
icon1: { | ||
marginRight: 30, | ||
}, | ||
|
||
iconText: { | ||
// marginRight: 120, | ||
fontFamily: "Roboto", | ||
fontSize: 18, | ||
fontWeight: "500", | ||
fontStyle: "normal" | ||
}, | ||
iconText2: { | ||
// marginRight: 60, | ||
fontFamily: "Roboto", | ||
fontSize: 18, | ||
fontWeight: "500", | ||
fontStyle: "normal" | ||
}, | ||
|
||
icon2: {}, | ||
|
||
divider: { | ||
marginLeft: 60, | ||
width: "68%", | ||
borderWidth: 1, | ||
backgroundColor: "black", | ||
}, | ||
down: { | ||
display: "flex", | ||
flexDirection: "row", | ||
alignItems: "center", | ||
justifyContent: "center", | ||
}, | ||
|
||
footer: { | ||
marginTop: '35%', | ||
}, | ||
|
||
footerText: { | ||
color: "black", | ||
alignItems: "flex-end", | ||
fontWeight: "400", | ||
fontStyle: "normal", | ||
fontSize: 14, | ||
}, | ||
button: { | ||
height: 40, | ||
width: '40%', | ||
borderRadius: 10, | ||
marginTop: '25%', | ||
alignSelf: 'center', | ||
margin: 40 | ||
|
||
// jus | ||
}, | ||
root: { | ||
display: "flex", | ||
flexDirection: "column", | ||
// alignItems: "center", | ||
justifyContent: "center", | ||
padding: 20, | ||
paddingTop: 50, | ||
}, | ||
title: { | ||
// paddingTop: 50, | ||
color: '#000', | ||
fontSize: 20, | ||
// fontWeight: '700', | ||
// textAlign: 'center', | ||
paddingBottom: 40, | ||
marginLeft: 30 | ||
}, | ||
|
||
cell: { | ||
backgroundColor: '#FFF7F7', | ||
borderRadius: 10 | ||
}, | ||
cellContainer: { | ||
borderRadius: 10, | ||
marginLeft: 30 | ||
|
||
}, | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters