diff --git a/src/components/Newsletter/Newsletter.module.scss b/src/components/Newsletter/Newsletter.module.scss new file mode 100644 index 0000000..0cc93b6 --- /dev/null +++ b/src/components/Newsletter/Newsletter.module.scss @@ -0,0 +1,199 @@ +@use '../../variables'; + +.newsletter { + + &__container { + display: flex; + justify-content: center; + align-items: center; + border-top: 1px solid variables.$black; + border-bottom: 1px solid variables.$black; + } + + &__form { + display: flex; + flex-direction: column; + gap: 8px; + margin: 16px 0; + position: relative; + + @media (min-width: 3600px) { + margin: 18px 0; + } + + @media (max-width: 1024px) { + width: 100%; + padding: 0 16px; + gap: 16px; + } + + &__title { + font-weight: 500; + font-size: 18px; + line-height: 21px; + letter-spacing: 0.05em; + font-variant: small-caps; + color: variables.$black-300; + text-align: left; + + @media (min-width: 3600px) { + font-size: 40px; + line-height: 48px; + } + + @media ((min-width: 2500px) and (max-width: 3599px)) { + font-size: 36px; + line-height: 42px; + } + + @media (max-width: 1024px) { + font-size: 14px; + line-height: 16px; + } + } + + &__items { + display: flex; + flex-direction: row; + align-items: flex-start; + justify-content: center; + gap: 8px; + + @media (max-width: 1024px) { + flex-direction: column; + align-items: stretch; + gap: 16px; + } + + &__email { + input { + background: variables.$white; + border: 1px solid variables.$gray-600; + border-radius: 4px; + width: 100%; + min-width: 340px; + height: 42px; + font-size: 14px; + line-height: 16px; + color: variables.$gray-400; + padding: 13px 16px; + + &::placeholder { + font-size: 14px; + line-height: 16px; + color: variables.$gray-400; + } + + @media (min-width: 3600px) { + font-size: 32px; + line-height: 36px; + min-width: 720px; + height: 64px; + + &::placeholder { + font-size: 32px; + line-height: 36px; + } + } + + @media ((min-width: 2500px) and (max-width: 3599px)) { + font-size: 28px; + line-height: 33px; + min-width: 668px; + height: 59px; + + &::placeholder { + font-size: 28px; + line-height: 33px; + } + } + + @media (max-width: 1024px) { + min-width: 100%; + padding: 17px 16px; + } + } + } + + &__btn { + width: 126px; + height: 42px; + background: variables.$black; + box-shadow: 0px 4px 4px variables.$shadow; + border-radius: 4px; + + display: flex; + align-items: center; + justify-content: center; + + font-weight: 700; + font-size: 12px; + line-height: 14px; + letter-spacing: 0.05em; + color: variables.$white; + padding: 20px 14px; + text-transform: uppercase; + + &:hover { + background: rgba($color: #000000, $alpha: .85); + border-color: transparent; + } + + &:active { + background: variables.$black; + } + + @media (min-width: 3600px) { + width: 280px; + height: 64px; + font-size: 28px; + line-height: 32px; + } + + @media ((min-width: 2500px) and (max-width: 3599px)) { + width: 246px; + height: 59px; + font-size: 24px; + line-height: 28px; + } + + @media (max-width: 1024px) { + width: 100%; + font-size: 14px; + line-height: 16px; + } + } + } + } +} + +span{ + font-size: 12px; + line-height: 14px; + color: variables.$red; + position: absolute; + right: 0; + top: 14px; + + @media (min-width: 3600px) { + font-size: 26px; + line-height: 30px; + top: 20px; + } + + @media ((min-width: 2500px) and (max-width: 3599px)) { + font-size: 24px; + line-height: 28px; + top: 20px; + } + + @media (min-width: 350px) and (max-width: 1024px) { + right: 16px; + } + + @media (max-width: 349px) { + font-size: 11px; + top: 18px; + right: 16px; + } +} diff --git a/src/components/Newsletter/Newsletter.tsx b/src/components/Newsletter/Newsletter.tsx new file mode 100644 index 0000000..6cd8e5c --- /dev/null +++ b/src/components/Newsletter/Newsletter.tsx @@ -0,0 +1,55 @@ +import React from 'react'; + +import { Formik, Form, Field, ErrorMessage} from "formik"; + +import styles from "./Newsletter.module.scss"; + +import NewsletterSchema from './Schema/NewsletterSchema'; + +interface NewsletterValue { + email: string; +} + +const initialValue = { + email: "", +} + +const Newsletter = () => { + + const handleFormikSubmit = (values: NewsletterValue) => { + //console.log(values); + }; + + return ( +