Commit 04fc9d9b by Tonk

add keyboardType

parent 525dbb05
...@@ -12,6 +12,7 @@ const InputField = ({ ...@@ -12,6 +12,7 @@ const InputField = ({
placeholder, placeholder,
errors, // this array prop is automatically passed down to this component from <Form /> errors, // this array prop is automatically passed down to this component from <Form />
isPass, isPass,
keyboardType,
}) => { }) => {
return ( return (
<View> <View>
...@@ -24,6 +25,7 @@ const InputField = ({ ...@@ -24,6 +25,7 @@ const InputField = ({
disabled={disabled} disabled={disabled}
style={customStyle ? customStyle : {}} style={customStyle ? customStyle : {}}
secureTextEntry={isPass} secureTextEntry={isPass}
keyboardType={keyboardType}
/> />
{errors && {errors &&
......
...@@ -5,7 +5,7 @@ import { Form, Field } from 'react-native-validate-form'; ...@@ -5,7 +5,7 @@ import { Form, Field } from 'react-native-validate-form';
import InputField from '../../components/layout/InputField'; import InputField from '../../components/layout/InputField';
import { LinearGradient } from 'expo-linear-gradient'; import { LinearGradient } from 'expo-linear-gradient';
import { Actions } from 'react-native-router-flux'; import { Actions } from 'react-native-router-flux';
import { Alert } from 'react-native' import { Alert } from 'react-native';
// validations // validations
const required = value => (value ? undefined : 'This is a required field.'); const required = value => (value ? undefined : 'This is a required field.');
...@@ -48,16 +48,16 @@ export default class register extends Component { ...@@ -48,16 +48,16 @@ export default class register extends Component {
'Completed!', 'Completed!',
'You have completed your registration', 'You have completed your registration',
[ [
// {text: 'Ask me later', onPress: () => console.log('Ask me later pressed')}, // {text: 'Ask me later', onPress: () => console.log('Ask me later pressed')},
// { // {
// text: 'Cancel', // text: 'Cancel',
// onPress: () => console.log('Cancel Pressed'), // onPress: () => console.log('Cancel Pressed'),
// style: 'cancel', // style: 'cancel',
// }, // },
{text: 'Go to Login', onPress: () => Actions.LoginPage()}, { text: 'Go to Login', onPress: () => Actions.LoginPage() },
], ],
{cancelable: false}, { cancelable: false }
); );
// Actions.LoginPage(); // Actions.LoginPage();
} }
...@@ -110,6 +110,7 @@ export default class register extends Component { ...@@ -110,6 +110,7 @@ export default class register extends Component {
onChangeText={val => this.setState({ email: val })} onChangeText={val => this.setState({ email: val })}
customStyle={theme.input} customStyle={theme.input}
placeholder="E-mail" placeholder="E-mail"
keyboardType={'email-address'}
/> />
{/* ---password--- */} {/* ---password--- */}
<Field <Field
...@@ -145,6 +146,7 @@ export default class register extends Component { ...@@ -145,6 +146,7 @@ export default class register extends Component {
onChangeText={val => this.setState({ phoneNum: val })} onChangeText={val => this.setState({ phoneNum: val })}
customStyle={theme.input} customStyle={theme.input}
placeholder="Phone number" placeholder="Phone number"
keyboardType={'phone-pad'}
/> />
</Form> </Form>
<Row style={{ marginTop: 30 }}> <Row style={{ marginTop: 30 }}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment