Account creation

This commit is contained in:
2024-06-22 23:59:44 +08:00
parent ce51b78b14
commit 4a39c5ad31
9 changed files with 380 additions and 58 deletions

View File

@@ -0,0 +1,32 @@
import { Input } from "@nextui-org/react";
import { useField } from "formik";
interface NextUIFormikInputProps {
label: string;
name: string;
type: string;
placeholder: string;
labelPlacement?: "inside" | "outside";
startContent?: JSX.Element;
}
const NextUIFormikInput = ({
label,
startContent,
...props
}: NextUIFormikInputProps) => {
const [field, meta] = useField(props.name);
return (
<Input
{...field}
{...props}
label={label}
isInvalid={meta.touched && !!meta.error}
errorMessage={meta.touched && meta.error ? meta.error : ""}
startContent={startContent}
/>
);
};
export default NextUIFormikInput;