Entrega do Desafio #2

Merged
anacarolinaduartecavalcante merged 81 commits from develop into main 2023-01-14 14:05:45 +00:00
Showing only changes of commit 8ac80bd0b4 - Show all commits

View File

@ -0,0 +1,24 @@
import styles from "../../Main.module.scss";
import { Field, ErrorMessage } from "formik";
interface FormContentFieldProps {
title: string;
name: string;
placeholder: string;
type: string;
}
const FormField = (props: FormContentFieldProps) => {
const { title, name, placeholder, type } = props;
return (
<div className={styles["FormContent__Field"]}>
<label>{title}</label>
<span className={styles["FormContent__Field__Error"]}>
<ErrorMessage name={name} />
</span>
<Field name={name} type={type} placeholder={placeholder} />
</div>
);
};
export { FormField };