UNPKG

@td-design/react-native

Version:

react-native UI组件库

17 lines 790 B
import { ForwardedRef, RefObject } from 'react'; import { NativeSyntheticEvent, TextInput, TextInputKeyPressEventData } from 'react-native'; import { PasscodeProps, PasscodeRef } from './type'; export default function usePasscode({ onChange, count, value, ref, onFinish, }: Pick<PasscodeProps, 'onChange' | 'value' | 'onFinish'> & { count: number; ref: ForwardedRef<PasscodeRef>; }): { otpCode: { [key: string]: string; } | { [x: string]: string; }; inputs: import("react").MutableRefObject<RefObject<TextInput>[]>; handleKeyPress: (index: number) => ({ nativeEvent: { key } }: NativeSyntheticEvent<TextInputKeyPressEventData>) => void; handleChangeText: (index: number) => (text: string) => void; }; //# sourceMappingURL=usePasscode.d.ts.map