-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-supplier.js
104 lines (98 loc) · 2.71 KB
/
create-supplier.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import { Button, Icon, Input, Text } from '@ui-kitten/components';
import { TouchableWithoutFeedback } from '@ui-kitten/components/devsupport';
import React from 'react';
import { View } from 'react-native';
import { ImageOverlay } from './extra/image-overlay.component';
import { KeyboardAvoidingView } from './extra/keyboard-avoiding-view.component';
import { styles } from './form-styles';
export const CreateSupplierScreen = ({ navigation }) => {
const [names, setNames] = React.useState("");
const [phoneNumber, setPhoneNumber] = React.useState("");
const [email, setEmail] = React.useState("");
const [password, setPassword] = React.useState("");
const [secureTextEntry, setSecureTextEntry] = React.useState(true);
const [address, setAddress] = React.useState("");
const [userName, setUserName] = React.useState("");
const onSignInButtonPress = () => {
navigation && navigation.goBack();
};
const onSignUpButtonPress = () => {
navigation && navigation.navigate('SignUp1');
};
const toggleSecureEntry = () => {
setSecureTextEntry(!secureTextEntry);
};
const renderIcon = (props) => (
<TouchableWithoutFeedback onPress={toggleSecureEntry}>
<Icon {...props} name={secureTextEntry ? 'eye-off' : 'eye'} />
</TouchableWithoutFeedback>
);
return (
<KeyboardAvoidingView>
<ImageOverlay
style={styles.container}
source={require('./assets/880687.jpg')}>
<View style={styles.signInContainer}>
<Text
style={styles.signInLabel}
status='control'
category='h4'>
CREATE SUPPLIER
</Text>
</View>
<View style={styles.formContainer}>
<Input
label='FULL NAME'
placeholder='Full Name'
status='control'
value={names}
onChangeText={setNames}
/>
<Input
label='ADDRESS'
placeholder='Address'
status='control'
value={address}
onChangeText={setAddress}
/>
<Input
label='PHONE NUMBER'
placeholder='0788888888'
status='control'
value={phoneNumber}
onChangeText={setPhoneNumber}
/>
<Input
label='EMAIL'
placeholder='Email'
status='control'
value={email}
onChangeText={setEmail}
/>
<Input
label='USER NAME'
placeholder='User name'
status='control'
value={userName}
onChangeText={setUserName}
/>
<Input
style={styles.passwordInput}
placeholder='Password'
label='PASSWORD'
status='control'
value={password}
onChangeText={setPassword}
secureTextEntry={secureTextEntry}
/>
</View>
<Button
status='control'
size='large'
onPress={onSignInButtonPress}>
CREATE SUPPLIER
</Button>
</ImageOverlay>
</KeyboardAvoidingView>
);
};