UNPKG

mui-one-time-password-input

Version:

A One-Time Password input designed for the React library MUI

25 lines (18 loc) 1.02 kB
import { BoxProps as BoxProps_2 } from '@mui/material/Box'; import { default as default_2 } from 'react'; import { TextFieldProps as TextFieldProps_2 } from '@mui/material/TextField'; declare interface BaseMuiOtpInputProps { value?: string; length?: number; autoFocus?: boolean; TextFieldsProps?: TextFieldProps | ((index: number) => TextFieldProps); onComplete?: (value: string) => void; validateChar?: (character: string, index: number) => boolean; onChange?: (value: string) => void; onBlur?: (value: string, isCompleted: boolean) => void; } declare type BoxProps = Omit<BoxProps_2, 'onChange' | 'onBlur'>; export declare const MuiOtpInput: default_2.ForwardRefExoticComponent<Omit<MuiOtpInputProps, "ref"> & default_2.RefAttributes<unknown>>; export declare type MuiOtpInputProps = BoxProps & BaseMuiOtpInputProps; declare type TextFieldProps = Omit<TextFieldProps_2, 'onChange' | 'select' | 'multiline' | 'defaultValue' | 'value' | 'autoFocus'>; export { }