Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

feat(default-theme): adjust buttons in checkout #1382

Merged
merged 1 commit into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
</template>
</SfRadio>
</div>
<div class="form__action">
<div class="sw-form__action">
<SwButton
class="sf-button--full-width form__action-button form__action-button--secondary color-secondary desktop-only sw-form__button"
class="sf-button--full-width form__action-button form__action-button--secondary color-secondary sw-form__button"
@click="$emit('click:back')"
>
{{ $t("Go back to Shipping") }}
Expand All @@ -59,12 +59,6 @@
>
{{ $t("Review order") }}
</SwButton>
<SwButton
class="sf-button--full-width sf-button--text form__action-button form__action-button--secondary mobile-only sw-form__button"
@click="$emit('click:back')"
>
{{ $t("Go back to Shipping") }}
</SwButton>
</div>
</div>
</div>
Expand Down Expand Up @@ -110,7 +104,21 @@ export default {
</script>
<style lang="scss" scoped>
@import "@/assets/scss/forms";
.sw-form {
&__action {
width: 100%;
margin-top: var(--spacer-xl);
display: table;

button {
display: table-cell;
width: 100%;
@include for-desktop {
width: 50%;
}
}
}
}
.title {
--heading-padding: var(--spacer-base) 0;
@include for-desktop {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,20 @@
</template>
</SfRadio>
</div>
<div class="form__action">
<div class="sw-form__action">
<SwButton
class="form__action-button color-secondary desktop-only"
class="sw-form__action-button color-secondary"
@click="$emit('retreat')"
>
{{ $t("Go back to Personal details") }}
</SwButton>
<SwButton
class="sf-button--full-width form__action-button sw-form__button"
class="sw-form__action-button sw-form__button"
data-cy="continue-to-payment"
@click="$emit('proceed')"
>
{{ $t("Continue to payment") }}
</SwButton>
<SwButton
class="sf-button--full-width sf-button--text form__action-button form__action-button--secondary mobile-only sw-form__button"
@click="$emit('retreat')"
>
{{ $t("Go back to Personal details") }}
</SwButton>
</div>
</div>
</div>
Expand Down Expand Up @@ -132,6 +126,20 @@ export default {
<style lang="scss" scoped>
@import "@/assets/scss/forms";

.sw-form {
&__action {
display: table;

button {
display: table-cell;
width: 100%;
@include for-desktop {
width: 50%;
}
}
}
}

.title {
--heading-padding: var(--spacer-base) 0;
@include for-desktop {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,25 +86,20 @@
class="form__element"
/>
</transition>
<div class="form__action">
<div class="sw-form__action">
<SwButton
class="sf-button--full-width form__action-button form__action-button--secondary color-secondary desktop-only sw-form__button"
class="form__action-button color-secondary sw-form__button"
data-cy="go-back-to-shop-button"
>
{{ $t("Go Back to shop") }}
</SwButton>
<SwButton
class="sf-button--full-width form__action-button sw-form__button"
class="form__action-button sw-form__button"
data-cy="continue-to-shipping-button"
@click="toShipping"
>
{{ $t("Continue to shipping") }}
</SwButton>
<SwButton
class="sf-button--full-width sf-button--text form__action-button form__action-button--secondary mobile-only sw-form__button"
>
{{ $t("Go Back to shop") }}
</SwButton>
</div>
</div>
</div>
Expand Down Expand Up @@ -415,11 +410,23 @@ export default {
}
}

.form__action {
margin: var(--spacer-sm) 0;
.sw-form {
&__action {
width: 100%;
margin-top: var(--spacer-xl);
display: table;

.sf-button + .sf-button {
margin-top: var(--spacer-sm);
button {
display: table-cell;
width: 100%;
@include for-desktop {
width: 50%;
}

&:last-child {
margin-top: var(--spacer-base);
}
}
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</template>
</SwPersonalInfo>
<SwButton
class="personal-details-user-form__proceed"
class="personal-details-user-form__proceed sf-button--full-width"
@click="$emit('proceed')"
>
{{ $t("Continue to shipping") }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,20 @@
</div>
<div class="summary__action">
<SwButton
class="sf-button--full-width summary__action-button summary__action-button--secondary color-secondary desktop-only"
class="sf-button--full-width summary__action-button summary__action-button--secondary color-secondary sw-form__button"
data-cy="go-back-to-payment"
@click="$emit('click:back')"
>
{{ $t("Go back to Payment") }}
</SwButton>
<SwButton
:disabled="!cartItems.length"
class="sf-button--full-width summary__action-button"
class="sf-button--full-width summary__action-button sw-form__button"
data-cy="place-my-order"
@click="$emit('proceed')"
>
{{ $t("Place my order") }}
</SwButton>
<SwButton
class="sf-button--full-width sf-button--text summary__action-button summary__action-button--secondary mobile-only"
@click="$emit('click:back')"
>
{{ $t("Go back to Payment") }}
</SwButton>
</div>
</div>
</template>
Expand Down Expand Up @@ -112,21 +106,23 @@ export default {
}
&__action {
padding: var(--spacer-base);
flex: 0 0 100%;
width: 90%;
margin: var(--spacer-base) 0 0 0;
@include for-desktop {
display: flex;
}
}
&__action-button {
--button-height: 3.25rem;
@include for-desktop {
--button-font-weight: var(--font-normal);
&:first-child {
margin: 0 var(--spacer-lg) 0 0;
display: table;

button {
display: table-cell;
width: 100%;
@include for-desktop {
width: 50%;
}

&:last-child {
margin-top: var(--spacer-base);
}
}
}

&__property {
margin: 0 0 var(--spacer-sm) 0;
--property-value-font-weight: var(--font-semibold);
Expand Down