import React from 'react'; import { View, Text } from 'react-native'; import { useAppTheme } from '@theme'; import { getStyles } from './otpInput.styles'; interface OtpInputProps { length?: number; value: string; error?: boolean; } export const OtpInput: React.FC = ({ length = 6, value, error }) => { const { colors } = useAppTheme(); const styles = getStyles(colors); const boxes = Array(length).fill(0); return ( {boxes.map((_, index) => { const char = value[index] || ''; const isFocused = index === value.length; return ( {char} ); })} ); }; export default OtpInput;