Onboarding: Center continue buttons in profile wizard (https://github.com/woocommerce/woocommerce-admin/pull/4802)

This commit is contained in:
Matt Sherman 2020-07-15 07:24:00 -04:00 committed by GitHub
parent c8de6b97be
commit c85f6bf0f3
4 changed files with 48 additions and 36 deletions

View File

@ -234,13 +234,15 @@ class Industry extends Component {
) }
</div>
<Button
isPrimary
onClick={ this.onContinue }
disabled={ ! selected.length }
>
{ __( 'Continue', 'woocommerce-admin' ) }
</Button>
<div className="woocommerce-profile-wizard__card-actions">
<Button
isPrimary
onClick={ this.onContinue }
disabled={ ! selected.length }
>
{ __( 'Continue', 'woocommerce-admin' ) }
</Button>
</div>
</Card>
</Fragment>
);
@ -249,7 +251,9 @@ class Industry extends Component {
export default compose(
withSelect( ( select ) => {
const { getProfileItems, getOnboardingError } = select( ONBOARDING_STORE_NAME );
const { getProfileItems, getOnboardingError } = select(
ONBOARDING_STORE_NAME
);
const { getSettings } = select( SETTINGS_STORE_NAME );
const { general: locationSettings = {} } = getSettings( 'general' );

View File

@ -27,8 +27,9 @@ class ProductTypes extends Component {
const profileItems = get( props, 'profileItems', {} );
const { productTypes = {} } = getSetting( 'onboarding', {} );
const defaultProductTypes = Object.keys( productTypes )
.filter( key => !! productTypes[ key ].default );
const defaultProductTypes = Object.keys( productTypes ).filter(
( key ) => !! productTypes[ key ].default
);
this.state = {
error: null,
@ -137,19 +138,19 @@ class ProductTypes extends Component {
.more_url ? (
<Link
href={
productTypes[ slug ]
.more_url
}
productTypes[ slug ]
.more_url
}
target="_blank"
type="external"
onClick={ () =>
this.onLearnMore( slug )
}
>
this.onLearnMore( slug )
}
>
{ __(
'Learn more',
'woocommerce-admin'
) }
'Learn more',
'woocommerce-admin'
) }
</Link>
) : (
''
@ -175,13 +176,15 @@ class ProductTypes extends Component {
) }
</div>
<Button
isPrimary
onClick={ this.onContinue }
disabled={ ! selected.length }
>
{ __( 'Continue', 'woocommerce-admin' ) }
</Button>
<div className="woocommerce-profile-wizard__card-actions">
<Button
isPrimary
onClick={ this.onContinue }
disabled={ ! selected.length }
>
{ __( 'Continue', 'woocommerce-admin' ) }
</Button>
</div>
</Card>
</Fragment>
);
@ -190,7 +193,9 @@ class ProductTypes extends Component {
export default compose(
withSelect( ( select ) => {
const { getProfileItems, getOnboardingError } = select( ONBOARDING_STORE_NAME );
const { getProfileItems, getOnboardingError } = select(
ONBOARDING_STORE_NAME
);
return {
isError: Boolean( getOnboardingError( 'updateProfileItems' ) ),

View File

@ -217,13 +217,18 @@ class StoreDetails extends Component {
/>
</div>
<Button
isPrimary
onClick={ handleSubmit }
disabled={ ! isValidForm }
>
{ __( 'Continue', 'woocommerce-admin' ) }
</Button>
<div className="woocommerce-profile-wizard__card-actions">
<Button
isPrimary
onClick={ handleSubmit }
disabled={ ! isValidForm }
>
{ __(
'Continue',
'woocommerce-admin'
) }
</Button>
</div>
</Fragment>
) }
</Form>

View File

@ -1,5 +1,3 @@
.woocommerce-profile-wizard__body {
.woocommerce-profile-wizard__container a {
color: $studio-pink-50;