@brainsbeards/react-native-animated-code-input
Version:
Animated code input component for React Native, with support for iOS, Android, and React Native Web. It works with one-time code autofill on iOS and Android.
18 lines (17 loc) • 979 B
TypeScript
import React from "react";
import { TextInput, NativeSyntheticEvent, TextInputFocusEventData } from "react-native";
export interface IInputProps {
autoFocus?: boolean;
value: string;
onBlur?: (e: NativeSyntheticEvent<TextInputFocusEventData>) => void;
onChangeText?: (text: string) => void;
onSubmit?: () => void;
textContentType?: "none" | "URL" | "addressCity" | "addressCityAndState" | "addressState" | "countryName" | "creditCardNumber" | "emailAddress" | "familyName" | "fullStreetAddress" | "givenName" | "jobTitle" | "location" | "middleName" | "name" | "namePrefix" | "nameSuffix" | "nickname" | "organizationName" | "postalCode" | "streetAddressLine1" | "streetAddressLine2" | "sublocality" | "telephoneNumber" | "username" | "password";
}
interface IProps extends IInputProps {
codeMaxLength: number;
testID?: string;
textInputRef: React.RefObject<TextInput>;
}
declare const InputField: React.FC<IProps>;
export default InputField;