From 4dfa60781603785516d591cefa750f497270a6b7 Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Thu, 9 Nov 2023 01:02:51 +0530 Subject: [PATCH] Make content responsive --- .../Button/NextButtonSiteGen/stylesheet.scss | 14 ++++++++- .../components/StateHandlers/Flow/index.js | 14 +++++---- .../steps/SiteGen/Welcome/index.js | 4 +-- .../steps/SiteGen/Welcome/stylesheet.scss | 29 ++++++++++++++++--- 4 files changed, 49 insertions(+), 12 deletions(-) diff --git a/src/OnboardingSPA/components/Button/NextButtonSiteGen/stylesheet.scss b/src/OnboardingSPA/components/Button/NextButtonSiteGen/stylesheet.scss index fdfda2464..4fd7d8707 100644 --- a/src/OnboardingSPA/components/Button/NextButtonSiteGen/stylesheet.scss +++ b/src/OnboardingSPA/components/Button/NextButtonSiteGen/stylesheet.scss @@ -7,7 +7,19 @@ text-align: center; width: 164px; height: 50px; - font-size: 15px; + font-size: clamp(0.5rem, 0.3864rem + 0.5682vw, 1.75rem); margin-top: 24px; + border-radius: 6px; + + @media (min-width: 2600px ) { + width: 250px; + height: 76px; + } + + @media (max-width: #{ ($break-small) }) { + width: 100px; + height: 30px; + margin-top: 10px; + } } } diff --git a/src/OnboardingSPA/components/StateHandlers/Flow/index.js b/src/OnboardingSPA/components/StateHandlers/Flow/index.js index 2adc29f72..673daf52a 100644 --- a/src/OnboardingSPA/components/StateHandlers/Flow/index.js +++ b/src/OnboardingSPA/components/StateHandlers/Flow/index.js @@ -7,7 +7,11 @@ import { HiiveAnalytics } from '@newfold-labs/js-utility-ui-analytics'; import { store as nfdOnboardingStore } from '../../../store'; import { switchFlow } from '../../../utils/api/flow'; import { MAX_RETRIES_FLOW_SWITCH } from '../../../../constants'; -import { ECOMMERCE_FLOW } from '../../../data/flows/constants'; +import { + DEFAULT_FLOW, + ECOMMERCE_FLOW, + SITEGEN_FLOW, +} from '../../../data/flows/constants'; import { removeQueryParam } from '../../../utils'; import { commerce } from '../../../chapters/commerce'; import EcommerceStepLoader from '../../Loaders/Step/Ecommerce'; @@ -91,15 +95,15 @@ const FlowStateHandler = () => { // TODO: Remove handleRender and replace with only children once Chapter Prioritization is enabled. const handleRender = () => { switch ( newFlow ) { - case 'ecommerce': + case ECOMMERCE_FLOW: return ; } switch ( window.nfdOnboarding.currentFlow ) { - case 'wp-setup': - case 'ecommerce': + case DEFAULT_FLOW: + case ECOMMERCE_FLOW: return ; - case 'sitegen': + case SITEGEN_FLOW: return ; } }; diff --git a/src/OnboardingSPA/steps/SiteGen/Welcome/index.js b/src/OnboardingSPA/steps/SiteGen/Welcome/index.js index f5afe6e7d..e6aec3439 100644 --- a/src/OnboardingSPA/steps/SiteGen/Welcome/index.js +++ b/src/OnboardingSPA/steps/SiteGen/Welcome/index.js @@ -31,9 +31,9 @@ const SiteGenWelcome = () => {
-

+

{ content.heading } -

+

diff --git a/src/OnboardingSPA/steps/SiteGen/Welcome/stylesheet.scss b/src/OnboardingSPA/steps/SiteGen/Welcome/stylesheet.scss index 1a67c1f06..dbe0c868d 100644 --- a/src/OnboardingSPA/steps/SiteGen/Welcome/stylesheet.scss +++ b/src/OnboardingSPA/steps/SiteGen/Welcome/stylesheet.scss @@ -13,6 +13,14 @@ justify-content: center; width: 500px; + @media (max-width: #{ ($break-small) }) { + margin: 16px; + } + + @media (min-width: 2600px ) { + width: 1000px; + } + &__animation { background-image: var(--sitegen-ai-animation); background-repeat: no-repeat; @@ -24,7 +32,7 @@ &__heading { display: flex; flex-direction: row; - width: 450px; + width: 100%; padding: 0; justify-content: center; align-items: center; @@ -35,24 +43,37 @@ background-image: var(--sitegen-ai-icon); background-repeat: no-repeat; background-size: cover; + + @media (max-width: #{ ($break-small) }) { + width: 32px; + height: 27px; + } + + @media (min-width: 2600px ) { + width: 100px; + height: 86px; + } + } &__text { color: var(--nfd-onboarding-primary); font-size: clamp(0.875rem, 0.6818rem + 0.9659vw, 3rem); - padding-left: 15px; + margin-left: 15px; + white-space: normal; + line-height: 1; } } &__sub-heading { - width: 450px; + width: 100%; margin: 10px; padding: 0; &__text { text-align: center; color: var(--nfd-onboarding-primary); - font-size: 18px; + font-size: clamp(0.875rem, 0.7727rem + 0.5114vw, 2rem); margin: 0; padding: 0; }