UNPKG

rsuite

Version:

A suite of react components

15 lines (14 loc) 573 B
/** * Hook for managing pin input value * - Handles controlled/uncontrolled value * - Normalizes value to array format * - Manages array updates and modifications */ export declare const usePinValue: (controlValue: string | undefined, defaultValue: string, length: number, onChange?: (value: string) => void, onComplete?: (value: string) => void) => { value: string; valueArray: string[]; setDigit: (index: number, digit: string) => void; clearDigit: (index: number) => void; updateValue: (newValue: string) => void; }; export default usePinValue;