Commit 04fc9d9b by Tonk

add keyboardType

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