Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
safetcut-app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
atichat
safetcut-app
Commits
04fc9d9b
Commit
04fc9d9b
authored
Jul 15, 2019
by
Tonk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add keyboardType
parent
525dbb05
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
src/components/layout/InputField.js
+2
-0
src/screens/public/register.js
+12
-10
No files found.
src/components/layout/InputField.js
View file @
04fc9d9b
...
@@ -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
&&
...
...
src/screens/public/register.js
View file @
04fc9d9b
...
@@ -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
}}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment