import { forwardRef } from "react"; import useDigitInput, { InputAttributes } from "react-digit-input"; import styles from "./DigitInput.module.css"; const DigitInputElement = forwardRef< HTMLInputElement, Omit & { autoFocus?: boolean; } >(({ ...props }, ref) => { return ( <> ); }); const DigitSeparator = forwardRef< HTMLInputElement, Omit & { autoFocus?: boolean; } >(({ ...props }, ref) => { return ( <> ); }); export const SixDigitInput = ({ value, onChange }: any) => { const digits = useDigitInput({ acceptedCharacters: /^[0-9]$/, length: 6, value, onChange, }); return (
); };