Compare commits

..

13 Commits

Author SHA1 Message Date
613bbc6bfe Merge pull request 'development' (#28) from development into main
Reviewed-on: #28
2023-01-13 19:00:53 +00:00
4cb28191b7 Merge pull request 'feat: adiciona validação quantidade mínima caracteres input nome' (#27) from feature/adiciona-validacao-input-nome into development
Reviewed-on: #27
2023-01-13 19:00:30 +00:00
dac47ac9f4 feat: adiciona validação quantidade mínima caracteres input nome 2023-01-13 15:57:30 -03:00
825adaf989 Merge pull request 'development' (#26) from development into main
Reviewed-on: #26
2023-01-12 14:14:31 +00:00
8e987bf898 Merge pull request 'feat: adiciona temporizador mensagem de sucesso formulário' (#25) from feature/adiciona-temporizador-mensagem-sucesso-formulario into development
Reviewed-on: #25
2023-01-12 14:12:08 +00:00
a8a485ceb0 feat: adiciona temporizador mensagem de sucesso formulário 2023-01-12 11:10:02 -03:00
540d012305 Merge pull request 'development' (#24) from development into main
Reviewed-on: #24
2023-01-10 16:02:30 +00:00
4d8887dfe2 Merge pull request 'refactor: ajusta footer top mobile conforme alterações no figma' (#23) from refactor/ajusta-footer-top-mobile into development
Reviewed-on: #23
2023-01-10 16:02:01 +00:00
e8952e776b refactor: ajusta footer top mobile conforme alterações no figma 2023-01-10 13:00:56 -03:00
18d3e25738 Merge pull request 'development' (#22) from development into main
Reviewed-on: #22
2023-01-09 20:33:05 +00:00
8cc9b599b9 Merge pull request 'refactor: ajusta mensagem de validação do newsletter' (#21) from refactor/ajusta-mensagem-validacao-newsletter into development
Reviewed-on: #21
2023-01-09 20:26:45 +00:00
33fdd701a6 refactor: ajusta mensagem de validação do newsletter 2023-01-09 17:25:49 -03:00
1e5c3e229f Merge pull request 'feat: adiciona botões fixos whatsapp e para o topo' (#20) from feature/adiciona-botoes-fixos-whatsapp-para-o-topo into development
Reviewed-on: #20
2023-01-09 19:52:08 +00:00
6 changed files with 40 additions and 33 deletions

View File

@ -114,14 +114,6 @@
text-transform: none;
}
}
&__socialMedia {
height: 35px;
.socialMeida-site {
display: none;
}
}
}
@media (min-width: 2500px) {

View File

@ -77,6 +77,7 @@ const Contact = () => {
const handleFormikSubmit = (values: FormikValues, { resetForm }: any) => {
resetForm({ values: "" });
setSuccessMessage(true);
setTimeout(() => setSuccessMessage(false), 3000);
};
return (
@ -110,10 +111,8 @@ const Contact = () => {
</div>
<div className={styles["form__input"]}>
<label htmlFor="cpf">CPF</label>
<Field
id="cpf"
name="cpf"
render={({ field }: any) => (
<Field id="cpf" name="cpf">
{({ field }: any) => (
<MaskedInput
{...field}
mask={cpfNumberMask}
@ -122,7 +121,7 @@ const Contact = () => {
type="text"
/>
)}
/>
</Field>
<ErrorMessage
component="span"
name="cpf"
@ -131,10 +130,8 @@ const Contact = () => {
</div>
<div className={styles["form__input"]}>
<label htmlFor="birthDate">Data de Nascimento:</label>
<Field
id="birthDate"
name="birthDate"
render={({ field }: any) => (
<Field id="birthDate" name="birthDate">
{({ field }: any) => (
<MaskedInput
{...field}
mask={bhirtDateMask}
@ -143,7 +140,7 @@ const Contact = () => {
type="text"
/>
)}
/>
</Field>
<ErrorMessage
component="span"
name="birthDate"
@ -152,10 +149,8 @@ const Contact = () => {
</div>
<div className={styles["form__input"]}>
<label htmlFor="phone">Telefone:</label>
<Field
id="phone"
name="phone"
render={({ field }: any) => (
<Field id="phone" name="phone">
{({ field }: any) => (
<MaskedInput
{...field}
mask={phoneNumberMask}
@ -164,7 +159,7 @@ const Contact = () => {
type="text"
/>
)}
/>
</Field>
<ErrorMessage
component="span"
name="phone"

View File

@ -1,7 +1,7 @@
import React from "react";
import styles from "./styles.module.scss";
import { Formik, Form, Field, ErrorMessage, FormikHelpers } from "formik";
import FormSchema from "../../schema/FormSchema";
import { Formik, Form, Field, ErrorMessage } from "formik";
import NewsletterSchema from "../../schema/NewsLetterSchema";
interface FormikValues {
newsLetter: string;
@ -12,8 +12,9 @@ const initialValues = {
};
const NewsLetter = () => {
const handleFormikSubmit = (values: FormikValues) => {
const handleNewsletterSubmit = (values: FormikValues, { resetForm }: any) => {
console.log(values);
resetForm({ values: "" });
};
return (
@ -22,9 +23,9 @@ const NewsLetter = () => {
<h1>Assine nossa Newsletter</h1>
</div>
<Formik
onSubmit={handleFormikSubmit}
onSubmit={handleNewsletterSubmit}
initialValues={initialValues}
validationSchema={FormSchema}
validationSchema={NewsletterSchema}
>
<Form className={styles["newsLetter__container"]}>
<Field
@ -34,7 +35,7 @@ const NewsLetter = () => {
placeholder="E-mail"
/>
<ErrorMessage component="span" name="newsLetter" />
<button className={styles["newsLetter__button"]} type="submit">
<button type="submit" className={styles["newsLetter__button"]}>
Enviar
</button>
</Form>

View File

@ -7,7 +7,6 @@
border-color: var(--black-500);
width: 100%;
padding: 16px 0;
position: relative;
&__title {
width: 37.09%;
@ -32,6 +31,7 @@
height: 42px;
width: 37.09%;
max-width: 474.75px;
position: relative;
span {
font-style: normal;
@ -40,8 +40,8 @@
line-height: 14px;
color: var(--red-500);
position: absolute;
top: 31%;
right: 43%;
top: -30%;
left: 55%;
}
}
@ -101,6 +101,11 @@
width: 100%;
max-width: 100%;
flex-direction: column;
span {
top: 43%;
left: 0%;
}
}
&__input {
@ -130,6 +135,13 @@
width: 36.88%;
max-width: 922px;
height: 59px;
span {
font-size: 24px;
line-height: 28px;
top: -42%;
left: 56%;
}
}
&__input {

View File

@ -1,7 +1,9 @@
import * as Yup from "yup";
export default Yup.object().shape({
name: Yup.string().required("*Campo Obrigatório"),
name: Yup.string()
.min(3, "Mínimo de 03 caracteres")
.required("*Campo Obrigatório"),
email: Yup.string().required("*Campo Obrigatório").email("e-Mail inválido"),
cpf: Yup.string()
.matches(/^\d{3}.\d{3}.\d{3}-\d{2}$/, "CPF inválido")

View File

@ -0,0 +1,5 @@
import * as Yup from "yup";
export default Yup.object().shape({
newsLetter: Yup.string().required("").email("e-Mail inválido"),
});