UNPKG

react-pin-code-input

Version:

React component for entering and validating a PIN code.

30 lines (29 loc) 982 B
import { CSSProperties, HTMLAttributes } from 'react'; declare type InputType = 'text' | 'number' | 'password' | 'tel'; export interface ReactPinCodeInputProps extends HTMLAttributes<HTMLDivElement> { type?: InputType; onInputChange: (v: Array<string>) => void; value: Array<string>; autoFocus?: boolean; disabled?: boolean; invalid?: boolean; pattern?: RegExp; required?: boolean; className?: string; disableInlineStyles?: boolean; style?: CSSProperties; inputStyle?: CSSProperties; inputInvalidStyle?: CSSProperties; } export declare const defaultProps: { type: string; autoFocus: boolean; disabled: boolean; invalid: boolean; disableInlineStyles: boolean; className: string; id: string; }; export declare function ReactPinCodeInputComponent(props: ReactPinCodeInputProps): JSX.Element; export declare const ReactPinCodeInput: import("react").NamedExoticComponent<ReactPinCodeInputProps>; export {};