UNPKG

react-native-otp-entry

Version:

A fully modifiable OTP Input Component for React Native

26 lines (25 loc) 918 B
/// <reference types="react" /> import { TextInput } from "react-native"; import { OtpInputProps } from "./OtpInput.types"; export declare const useOtpInput: ({ onTextChange, onFilled, numberOfDigits, disabled, autoFocus, blurOnFilled, type, onFocus, onBlur, placeholder: _placeholder, }: OtpInputProps) => { models: { text: string; inputRef: import("react").RefObject<TextInput>; focusedInputIndex: number; isFocused: boolean; placeholder: string | undefined; }; actions: { handlePress: () => void; handleTextChange: (value: string) => void; clear: () => void; focus: () => void; blur: () => void; handleFocus: () => void; handleBlur: () => void; }; forms: { setText: import("react").Dispatch<import("react").SetStateAction<string>>; setTextWithRef: (value: string) => void; }; };