@towsila/expo-ui-library 3.3.3 → 3.3.5

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.3",
3
+ "version": "3.3.5",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -5,6 +5,8 @@ import { textSize, Fonts} from "../../tokens/typography";
5
5
  import TemplateSubPage from "../reusable/templateSubPage";
6
6
  import { useCountdown } from "../../hooks/useCountdown";
7
7
  import SharpOtpInput from "../ui/sharpOtpInput";
8
+ import { useLanguage } from "../../context/LanguageContext";
9
+ import OtpInput from "../ui/OTPInput";
8
10
 
9
11
  interface VerificationCodeScreenProps {
10
12
  onVerify: (code: string) => void;
@@ -41,6 +43,7 @@ export default function VerificationCodeScreen({
41
43
  onResend();
42
44
  reset();
43
45
  };
46
+ const {isRTL} = useLanguage();
44
47
  return (
45
48
  <TemplateSubPage
46
49
  title={title}
@@ -51,14 +54,14 @@ export default function VerificationCodeScreen({
51
54
  onBack={onBack}
52
55
  loading={loading}
53
56
  >
54
- <SharpOtpInput length={4} onChange={setCode} />
57
+ <OtpInput length={4} onChange={setCode} size={60}/>
55
58
  {count !== 0 ? (
56
- <Text style={{ textAlign: "center", color: colors.text.placeholder, fontSize: textSize.xs, fontFamily: Fonts.montserrat.regular}}>
59
+ <Text style={{ textAlign: isRTL ? "left" : "right", color: colors.text.placeholder, fontSize: textSize.xs, fontFamily: Fonts.montserrat.regular}}>
57
60
  {resendText}: {count} {unit}
58
61
  </Text>
59
62
  ) : (
60
63
  <TouchableOpacity onPress={handleResend}>
61
- <Text style={{ textAlign: "center", color: colors.primary, fontSize: textSize.sm, fontFamily: Fonts.montserrat.regular }}>
64
+ <Text style={{textAlign: isRTL ? "left" : "right", color: colors.primary, fontSize: textSize.sm, fontFamily: Fonts.montserrat.regular }}>
62
65
  {resendBtn}
63
66
  </Text>
64
67
  </TouchableOpacity>