feature/challenge #1

Merged
BernardoWaldhelm merged 38 commits from feature/challenge into main 2023-01-15 15:25:18 +00:00
4 changed files with 34 additions and 8 deletions
Showing only changes of commit dc41d8bd11 - Show all commits

View File

@ -0,0 +1,18 @@
import { ButtonHTMLAttributes } from "react";
interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
className?: string;
type: "button" | "submit" | "reset";
disabled?: boolean;
text: string;
}
export const ButtonForm = (props: IButtonProps) => {
const { className, text, type, disabled } = props;
return (
<button className={className} type={type} disabled={disabled}>
{text}
</button>
);
};

View File

@ -5,6 +5,7 @@ import { useState } from "react";
import FormSchema from "../../../schema/FormSchema";
import styles from "./FaleConosco.module.scss";
import { ButtonForm } from "../../Atoms/ButtonForm/ButtonForm";
interface IFormikValues {
name: string;
@ -202,13 +203,13 @@ const FaleConosco = () => {
<Field name="acceptTerms" type="checkbox" />
</div>
<button
<ButtonForm
className={styles["form__button"]}
disabled={!isValid}
type="submit"
>
CADASTRE-SE
</button>
text={"CADASTRE-SE"}
/>
{FormSuccess && (
<span className={styles["form__wrapper__success"]}>
*Formulário enviado com sucesso*

View File

@ -37,7 +37,11 @@ const FooterBottom = () => {
</ul>
<div className={styles["footer__bottom__payments__divider"]}></div>
<ul className={styles["footer__bottom__payments__security"]}>
<Icone src={vtex} alt="Vtex PCI - SECURITY" />
<Icone
src={vtex}
alt="Vtex PCI - SECURITY"
className={styles["vtex-security"]}
/>
</ul>
</div>
<div className={styles["footer__bottom__development"]}>

View File

@ -1,4 +1,5 @@
import { Formik, Form, Field, ErrorMessage } from "formik";
import { ButtonForm } from "../../../Atoms/ButtonForm/ButtonForm";
import styles from "./FooterNewsletter.module.scss";
interface IFormikValue {
@ -36,9 +37,11 @@ const FooterNewsletter = () => {
className={styles["footer-newsletter__form__error"]}
component="span"
/>
<button type="submit" className={styles["footer-newsletter__form__btn"]}>
ENVIAR
</button>
<ButtonForm
type="submit"
className={styles["footer-newsletter__form__btn"]}
text={"ENVIAR"}
/>
</div>
</Form>
</Formik>