@towsila/expo-ui-library 3.3.8 → 3.3.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@towsila/expo-ui-library",
3
- "version": "3.3.8",
3
+ "version": "3.3.10",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -30,6 +30,8 @@ export default function OtpInput({ length = 6, onComplete, onChange, style, size
30
30
 
31
31
  if (text && index < length - 1) {
32
32
  refs.current[index + 1]?.focus();
33
+ } else if (!text && index > 0) {
34
+ refs.current[index - 1]?.focus();
33
35
  }
34
36
 
35
37
  if (code.length === length && newDigits.every((d) => d !== "")) {
@@ -50,7 +52,7 @@ export default function OtpInput({ length = 6, onComplete, onChange, style, size
50
52
  ]}
51
53
  keyboardType="number-pad"
52
54
  maxLength={1}
53
- // textAlign="center"
55
+ textAlign="center"
54
56
  value={digit}
55
57
  onChangeText={(text) => handleChange(text, index)}
56
58
  onFocus={() => setFocusedIndex(index)}