Fix more build errors

This commit is contained in:
Darren Clarke 2023-03-15 12:17:43 +00:00
parent 1bdc1e60db
commit 30ce47826f
61 changed files with 1161 additions and 541 deletions

View file

@ -1,3 +1,4 @@
/* eslint-disable react/display-name */
import { forwardRef } from "react";
import useDigitInput, { InputAttributes } from "react-digit-input";
import styles from "./DigitInput.module.css";
@ -7,36 +8,35 @@ const DigitInputElement = forwardRef<
Omit<InputAttributes, "ref"> & {
autoFocus?: boolean;
}
>(({ ...props }, ref) => {
return (
<>
<input
aria-label="verification code"
className={styles.input}
{...props}
ref={ref}
inputMode="decimal"
/>
</>
);
});
>(({ ...props }, ref) => (
<>
<input
aria-label="verification code"
className={styles.input}
{...props}
ref={ref}
inputMode="decimal"
/>
</>
));
const DigitSeparator = forwardRef<
HTMLInputElement,
Omit<InputAttributes, "ref"> & {
autoFocus?: boolean;
}
>(({ ...props }, ref) => {
return (
>(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
({ ...props }, ref) => (
<>
<span className={styles.hyphen} ref={ref} />
</>
);
});
)
);
export const SixDigitInput = ({ value, onChange }: any) => {
const digits = useDigitInput({
acceptedCharacters: /^[0-9]$/,
acceptedCharacters: /^\d$/,
length: 6,
value,
onChange,