Skip to content

Commit

Permalink
Fix Next Placement
Browse files Browse the repository at this point in the history
  • Loading branch information
officiallygod committed Jan 15, 2024
1 parent 4671e14 commit 7b4ef77
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 24 deletions.
23 changes: 14 additions & 9 deletions src/OnboardingSPA/components/TextInput/TextInputSiteGen/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import { useRef, useEffect, useState, memo } from '@wordpress/element';
const TextInputSiteGen = ( {
hint,
height,
children,
placeholder,
customerInput,
setIsValidInput,
setCustomerInput,
customChildren = false,
} ) => {
const textareaRef = useRef( null );
const [ analysisScore, setAnalysisScore ] = useState( 0 );
Expand Down Expand Up @@ -85,16 +87,19 @@ const TextInputSiteGen = ( {
onChange={ ( e ) => onTextChange( e ) }
/>
</div>
{ customerInput ? (
<div className={ 'nfd-sg-input-box__info' }>
<div className={ 'nfd-sg-input-box__info-text' }>
{ __( 'Detail', 'wp-module-onboarding' ) }
<div className={ 'nfd-sg-input-box_bottom' }>
{ customerInput ? (
<div className={ 'nfd-sg-input-box__info' }>
<div className={ 'nfd-sg-input-box__info-text' }>
{ __( 'Detail', 'wp-module-onboarding' ) }
</div>
{ renderDetails() }
</div>
{ renderDetails() }
</div>
) : (
<p className={ 'nfd-sg-input-box__hint' }>{ hint }</p>
) }
) : (
<p className={ 'nfd-sg-input-box__hint' }>{ hint }</p>
) }
{ customChildren && children }
</div>
</label>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ $selected-detail: #1de082;
}

&__hint {
margin-top: 30px;
font-weight: 300;
font-size: 0.87rem;
padding: 0 1.5px;
Expand All @@ -44,7 +43,6 @@ $selected-detail: #1de082;

&__info {
display: flex;
margin-top: 30px;
align-items: center;

&-text {
Expand All @@ -56,8 +54,8 @@ $selected-detail: #1de082;
}

&-icon {
width: 10px;
height: 6px;
width: 12px;
height: 6.5px;
margin: 3px;
border-radius: 6px;
animation: fadeIn 100ms ease-in;
Expand All @@ -69,6 +67,14 @@ $selected-detail: #1de082;
}
}
}

&_bottom {
display: flex;
margin-top: 30px;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
}

}
22 changes: 12 additions & 10 deletions src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,18 @@ const SiteGenSiteDetails = () => {
customerInput={ customerInput }
setIsValidInput={ setIsValidInput }
setCustomerInput={ setCustomerInput }
/>
{ isLargeViewport && (
<div className={ 'nfd-sg-site-details-endrow' }>
<NextButtonSiteGen
className={ 'nfd-sg-site-details--next-btn' }
text={ content.buttonText }
disabled={ ! isValidInput }
/>
</div>
) }
customChildren={ true }
>
{ isLargeViewport && (
<div className={ 'nfd-sg-site-details-endrow' }>
<NextButtonSiteGen
className={ 'nfd-sg-site-details--next-btn' }

Check failure on line 77 in src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Replace `·'nfd-sg-site-details--next-btn'·` with `⏎↹↹↹↹↹↹↹↹↹↹'nfd-sg-site-details--next-btn'⏎↹↹↹↹↹↹↹↹↹`
text={ content.buttonText }
disabled={ ! isValidInput }
/>
</div>
) }
</TextInputSiteGen>
</div>
</Animate>
</CommonLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
}

&-endrow {
width: 100%;
display: flex;
justify-content: flex-end;

Expand Down

0 comments on commit 7b4ef77

Please sign in to comment.