OTPInput.d.ts 481 B

1234567891011
  1. import * as React from 'react';
  2. import type { InputProps, InputRef } from '../Input';
  3. export interface OTPInputProps extends Omit<InputProps, 'onChange'> {
  4. index: number;
  5. onChange: (index: number, value: string) => void;
  6. /** Tell parent to do active offset */
  7. onActiveChange: (nextIndex: number) => void;
  8. mask?: boolean | string;
  9. }
  10. declare const OTPInput: React.ForwardRefExoticComponent<OTPInputProps & React.RefAttributes<InputRef>>;
  11. export default OTPInput;