UNPKG

input-otp-native

Version:

One time passcode Input For React Native/Expo. Unstyled and fully customizable.

19 lines 760 B
import * as React from 'react'; import { TextInput } from 'react-native'; import type { OTPInputProps, RenderProps } from './types'; export declare function useInput({ onChange: _onChange, maxLength, pattern, placeholder, defaultValue, onComplete, pasteTransformer, }: Pick<OTPInputProps, 'onChange' | 'maxLength' | 'pattern' | 'placeholder' | 'defaultValue' | 'onComplete' | 'pasteTransformer'>): { inputRef: React.RefObject<TextInput>; contextValue: RenderProps; value: string; isFocused: boolean; handlers: { onChangeText: (text: string) => void; onFocus: () => void; onBlur: () => void; }; actions: { clear: () => void; focus: () => void; }; }; //# sourceMappingURL=use-input.d.ts.map