From b8cfdfba9e2c0b5350438c4a1822fcf3b317d133 Mon Sep 17 00:00:00 2001 From: Ani Date: Sat, 6 Jan 2024 09:33:48 +0200 Subject: [PATCH] Update Subscription section UI (#1699) * Update Subscription section * Remove end icon * Fix formatting errors --------- Co-authored-by: ani-kalpachka --- .../SubscriptionSection.styled.tsx | 7 ++++ .../SubscriptionSection.tsx | 40 ++++++++++--------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/src/components/client/index/sections/SubscriptionSection/SubscriptionSection.styled.tsx b/src/components/client/index/sections/SubscriptionSection/SubscriptionSection.styled.tsx index b10a43bfb..74d06c87f 100644 --- a/src/components/client/index/sections/SubscriptionSection/SubscriptionSection.styled.tsx +++ b/src/components/client/index/sections/SubscriptionSection/SubscriptionSection.styled.tsx @@ -3,6 +3,13 @@ import { styled } from '@mui/material/styles' import theme from 'common/theme' +export const Root = styled('section')(() => ({ + maxWidth: theme.spacing(150), + margin: '0 auto', + padding: theme.spacing(0, 3), + marginBottom: theme.spacing(13), +})) + export const InfoText = styled(Typography)(() => ({ textAlign: 'center', fontSize: theme.typography.pxToRem(16), diff --git a/src/components/client/index/sections/SubscriptionSection/SubscriptionSection.tsx b/src/components/client/index/sections/SubscriptionSection/SubscriptionSection.tsx index 9b2190a23..0256dc54c 100644 --- a/src/components/client/index/sections/SubscriptionSection/SubscriptionSection.tsx +++ b/src/components/client/index/sections/SubscriptionSection/SubscriptionSection.tsx @@ -1,13 +1,16 @@ import React, { useState } from 'react' import { useTranslation } from 'next-i18next' -import { Heading } from '../../IndexPage.styled' -import { InfoText } from './SubscriptionSection.styled' + import { Grid } from '@mui/material' import ArrowForwardSharp from '@mui/icons-material/ArrowForwardSharp' import EmailIcon from '@mui/icons-material/Email' + import RenderSubscribeModal from 'components/client/notifications/GeneralSubscribeModal' +import theme from 'common/theme' + +import { Heading } from '../../IndexPage.styled' +import { Root, InfoText } from './SubscriptionSection.styled' import { - SectionGridWrapper, SubscribeButton, SubscribeHeading, Subtitle, @@ -22,20 +25,22 @@ const SubscriptionSection = () => { const [subscribeIsOpen, setSubscribeOpen] = useState(false) return ( - ({ - marginBottom: theme.spacing(5), - })}> + ({ + sx={{ margin: '0 auto', - maxWidth: theme.spacing(95), textAlign: 'center', - })}> + }}> {t('index:subscription-section.heading')} - {t('index:subscription-section.content')} + + {t('index:subscription-section.content')} + {subscribeIsOpen && } - + { {t('campaigns:cta.subscribe-monthly-newsletter')} - {t('campaigns:cta.subscribe-general-monthly-newsletter')} - setSubscribeOpen(true)} - variant="contained" - endIcon={}> + + {t('campaigns:cta.subscribe-general-monthly-newsletter')} + + setSubscribeOpen(true)} variant="contained"> {t('campaigns:cta.subscribe-general-newsletter-button')} - + ) }