@momo-kits/foundation 0.92.1-tracking.21 → 0.92.1-tracking.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Input/Input.tsx +10 -0
- package/package.json +1 -1
package/Input/Input.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, {forwardRef, useContext, useRef, useState} from 'react';
|
|
2
2
|
import {
|
|
3
3
|
NativeSyntheticEvent,
|
|
4
|
+
Platform,
|
|
4
5
|
TextInput,
|
|
5
6
|
TextInputFocusEventData,
|
|
6
7
|
TouchableOpacity,
|
|
@@ -44,6 +45,7 @@ const Input = forwardRef(
|
|
|
44
45
|
fontWeight = 'Regular',
|
|
45
46
|
onPressIcon,
|
|
46
47
|
secureTextEntry,
|
|
48
|
+
keyboardType,
|
|
47
49
|
style,
|
|
48
50
|
params,
|
|
49
51
|
componentId,
|
|
@@ -129,6 +131,13 @@ const Input = forwardRef(
|
|
|
129
131
|
}`,
|
|
130
132
|
);
|
|
131
133
|
|
|
134
|
+
if (secureTextEntry) {
|
|
135
|
+
keyboardType = Platform.select({
|
|
136
|
+
ios: 'ascii-capable',
|
|
137
|
+
android: 'visible-password',
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
132
141
|
return (
|
|
133
142
|
<View
|
|
134
143
|
style={[
|
|
@@ -177,6 +186,7 @@ const Input = forwardRef(
|
|
|
177
186
|
placeholder={placeholder}
|
|
178
187
|
selectionColor={theme.colors.primary}
|
|
179
188
|
placeholderTextColor={placeholderColor}
|
|
189
|
+
keyboardType={keyboardType}
|
|
180
190
|
/>
|
|
181
191
|
</View>
|
|
182
192
|
<View style={styles.iconView}>
|