Skip to content

Commit

Permalink
modify primary, secondary steps which were merged
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Jan 25, 2023
1 parent 02f79b2 commit f1b5cad
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { __ } from '@wordpress/i18n';
import { __, sprintf } from '@wordpress/i18n';
import CommonLayout from '../../../../../components/Layouts/Common';
import NewfoldLargeCard from '../../../../../components/NewfoldLargeCard';
import {
Expand Down Expand Up @@ -95,19 +95,28 @@ const StepPrimarySetup = () => {
) }
/>
</div>
<Animate type="fade-in" after={ content.categories && ( selectedPrimaryCategoryInStore !== null ) }>
<Animate
type="fade-in-disabled"
after={
content.categories &&
selectedPrimaryCategoryInStore !== null
}
>
<div className="nfd-setup-primary-categories">
{ content.categories.map( ( item, idx ) => {
return (
<div
key={ item?.name }
className={ `${
clickedIndex === idx ||
item.name === selectedPrimaryCategoryInStore
item.name ===
selectedPrimaryCategoryInStore
? 'chosenPrimaryCategory '
: ''
}nfd-card-category` }
onClick={ ( e ) => handleCategoryClick( idx ) }
onClick={ ( e ) =>
handleCategoryClick( idx )
}
>
<div className="nfd-card-category-wrapper">
<span
Expand Down Expand Up @@ -151,7 +160,7 @@ const StepPrimarySetup = () => {
</Animate>
<NavCardButton
text={ __( content.buttonText ) }
disabled={ content.categories === null}
disabled={ content.categories === null }
/>
<NeedHelpTag />
</NewfoldLargeCard>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { __ } from '@wordpress/i18n';
import { __, sprintf } from '@wordpress/i18n';
import CommonLayout from '../../../../../components/Layouts/Common';
import NewfoldLargeCard from '../../../../../components/NewfoldLargeCard';
import {
Expand Down Expand Up @@ -102,14 +102,21 @@ const StepPrimarySetup = () => {
) }
/>
</div>
<Animate type="fade-in" after={ categoriesArray[ 0 ]?.subCategories && ( selectedCategoryInStore !== null ) }>
<Animate
type="fade-in-disabled"
after={
categoriesArray[ 0 ]?.subCategories &&
selectedCategoryInStore !== null
}
>
<div className="nfd-setup-secondary-categories">
<div className="nfd-card-category-wrapper">
<div className="category-scrolling-wrapper">
<span
className="icon"
style={ {
backgroundImage: categoriesArray[ 0 ].icon,
backgroundImage:
categoriesArray[ 0 ].icon,
} }
/>
<p className="categName">
Expand Down

0 comments on commit f1b5cad

Please sign in to comment.