Skip to content

Commit

Permalink
using Animate component checking for more variables for animation
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijitb committed Jan 17, 2023
1 parent 6d4bea7 commit 81a2c3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +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';
import Animate from '../../../../../components/Animate';

const StepPrimarySetup = () => {
const {
Expand Down Expand Up @@ -95,7 +95,7 @@ const StepPrimarySetup = () => {
) }
/>
</div>
<StepStateHandler watch={ content.categories }>
<Animate type="fade-in" after={ content.categories && selectedPrimaryCategoryInStore }>
<div className="nfd-setup-primary-categories">
{ content.categories.map( ( item, idx ) => {
return (
Expand Down Expand Up @@ -148,7 +148,7 @@ const StepPrimarySetup = () => {
/>
</div>
</div>
</StepStateHandler>
</Animate>
<NavCardButton
text={ __( content.buttonText ) }
disabled={ content.categories === null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +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';
import Animate from '../../../../../components/Animate';

const StepPrimarySetup = () => {
const {
Expand Down Expand Up @@ -102,7 +102,7 @@ const StepPrimarySetup = () => {
) }
/>
</div>
<StepStateHandler watch={ categoriesArray[ 0 ]?.subCategories }>
<Animate type="fade-in" after={ categoriesArray[ 0 ]?.subCategories && selectedCategoryInStore }>
<div className="nfd-setup-secondary-categories">
<div className="nfd-card-category-wrapper">
<div className="category-scrolling-wrapper">
Expand Down Expand Up @@ -166,7 +166,7 @@ const StepPrimarySetup = () => {
/>
</div>
</div>
</StepStateHandler>
</Animate>
<NavCardButton
text={ __( content.buttonText ) }
disabled={ categoriesArray[ 0 ]?.subCategories === null }
Expand Down

0 comments on commit 81a2c3d

Please sign in to comment.