import { useFormikContext } from "formik"; import React from "react"; import InputMask from "react-input-mask"; import styles from "./M3Field.css"; import { FormFields } from "../B2bForm"; import { FieldProps } from "./M3Field"; export const M3CnpjField: StorefrontFunctionComponent = ( { type, name, label }: FieldProps) => { const { values, touched, handleChange, handleBlur, errors } = useFormikContext(); return
{errors[name] && touched[name] && errors[name]}
; };