From 6c85151b34684017ebce63bcae714aade925ad7d Mon Sep 17 00:00:00 2001 From: abhijitb Date: Fri, 6 Jan 2023 02:19:27 +0530 Subject: [PATCH] added fadein affect for the sitetype steps --- .../SiteTypeSetup/PrimarySite/index.js | 111 ++++++++-------- .../SiteTypeSetup/SecondarySite/index.js | 123 +++++++++--------- 2 files changed, 121 insertions(+), 113 deletions(-) diff --git a/src/OnboardingSPA/pages/Steps/GetStarted/SiteTypeSetup/PrimarySite/index.js b/src/OnboardingSPA/pages/Steps/GetStarted/SiteTypeSetup/PrimarySite/index.js index 43e191521..c978f2857 100644 --- a/src/OnboardingSPA/pages/Steps/GetStarted/SiteTypeSetup/PrimarySite/index.js +++ b/src/OnboardingSPA/pages/Steps/GetStarted/SiteTypeSetup/PrimarySite/index.js @@ -13,6 +13,7 @@ import NavCardButton from '../../../../../components/Button/NavCardButton'; import NeedHelpTag from '../../../../../components/NeedHelpTag'; import content from '../content.json'; import { translations } from '../../../../../utils/locales/translations'; +import StepStateHandler from '../../../../../components/StateHandlers/StepStateHandler'; const StepPrimarySetup = () => { const { @@ -94,63 +95,65 @@ const StepPrimarySetup = () => { ) } /> - -
- { content.categories.map( ( item, idx ) => { - return ( -
handleCategoryClick( idx ) } - > -
- - - { item?.name } - + +
+ { content.categories.map( ( item, idx ) => { + return ( +
handleCategoryClick( idx ) } + > +
+ + + { item?.name } + +
-
- ); - } ) } -
- -
-
-

or tell us here:

- categoryInput( e ) } - className="tellUsInput" - placeholder={ sprintf( - __( - content.placeholderSiteTypeInput, - 'wp-module-onboarding' - ), - translations( 'site' ) - ) } - value={ inputCategVal } - /> + ); + } ) }
-
- - + +
+
+

or tell us here:

+ categoryInput( e ) } + className="tellUsInput" + placeholder={ sprintf( + __( + content.placeholderSiteTypeInput, + 'wp-module-onboarding' + ), + translations( 'site' ) + ) } + value={ inputCategVal } + /> +
-
+ + + ); diff --git a/src/OnboardingSPA/pages/Steps/GetStarted/SiteTypeSetup/SecondarySite/index.js b/src/OnboardingSPA/pages/Steps/GetStarted/SiteTypeSetup/SecondarySite/index.js index 5c836b0b5..040cebec2 100644 --- a/src/OnboardingSPA/pages/Steps/GetStarted/SiteTypeSetup/SecondarySite/index.js +++ b/src/OnboardingSPA/pages/Steps/GetStarted/SiteTypeSetup/SecondarySite/index.js @@ -13,6 +13,7 @@ import NavCardButton from '../../../../../components/Button/NavCardButton'; import NeedHelpTag from '../../../../../components/NeedHelpTag'; import content from '../content.json'; import { translations } from '../../../../../utils/locales/translations'; +import StepStateHandler from '../../../../../components/StateHandlers/StepStateHandler'; const StepPrimarySetup = () => { const { @@ -101,71 +102,75 @@ const StepPrimarySetup = () => { ) } />
- -
-
-
- -

- { ' ' } - { categoriesArray[ 0 ].name } -

+ +
+
+
+ +

+ { ' ' } + { categoriesArray[ 0 ].name } +

+
-
- -
- { categoriesArray[ 0 ]?.subCategories?.map( - ( item, idx ) => { - return ( - - handleCategoryClick( idx ) - } - className={ `${ - clickedIndex === idx || - item === selectedCategoryInStore - ? 'chosenSecondaryCategory ' - : '' - }nfd-card-category` } - > - { item } - - ); - } - ) } -
-
-
-
-
- { __( - content.tellusHereText, - 'wp-module-onboarding' +
+ { categoriesArray[ 0 ]?.subCategories?.map( + ( item, idx ) => { + return ( + + handleCategoryClick( idx ) + } + className={ `${ + clickedIndex === idx || + item === selectedCategoryInStore + ? 'chosenSecondaryCategory ' + : '' + }nfd-card-category` } + > + { item } + + ); + } ) }
- categoryInput( e ) } - className="tellUsInput" - placeholder={ sprintf( - __( - content.placeholderSiteTypeInput, +
+ +
+
+
+ { __( + content.tellusHereText, 'wp-module-onboarding' - ), - translations( 'site' ) - ) } - value={ inputCategVal } - /> + ) } +
+ categoryInput( e ) } + className="tellUsInput" + placeholder={ sprintf( + __( + content.placeholderSiteTypeInput, + 'wp-module-onboarding' + ), + translations( 'site' ) + ) } + value={ inputCategVal } + /> +
-
- + +