Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: user addresses styling #1173

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 @@ -2,14 +2,14 @@
<div>
<SfAddressPicker
:selected="`${selectedAddress}`"
class="billing__addresses"
class="addresses"
@change="setCurrentAddress($event)"
>
<SfAddress
v-for="billingAddress in addressesWithCountryName"
:key="userBillingGetters.getId(billingAddress)"
:name="`${userBillingGetters.getId(billingAddress)}`"
class="billing__address"
class="address"
>
<UserAddressDetails :address="billingAddress">
<template #country>
Expand All @@ -22,7 +22,7 @@
:selected="value"
name="setAsDefault"
label="Use this address as my default one."
class="billing__setAsDefault"
class="setAsDefault"
@change="$emit('input', $event)"
/>
<hr class="sf-divider">
Expand Down Expand Up @@ -99,31 +99,5 @@ export default defineComponent({
</script>

<style lang="scss" scoped>
.billing {
&__address {
margin-bottom: var(--spacer-base);
@include for-desktop {
margin-right: var(--spacer-sm);
display: flex;
width: 100%;
flex-direction: column;
}
}

&__addresses {
margin-bottom: var(--spacer-xl);
@include for-desktop {
display: flex;
}
}

&__setAsDefault {
margin-bottom: var(--spacer-xl);
}
}

.sf-divider,
.form__action-button--margin-bottom {
margin-bottom: var(--spacer-xl);
}
@import "./styles/userAddresses";
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<div>
<SfAddressPicker
:selected="`${currentAddressId}`"
class="shipping__addresses"
class="addresses"
@change="setCurrentAddress($event)"
>
<SfAddress
v-for="shippingAddress in addressesWithCountryName"
:key="userShippingGetters.getId(shippingAddress)"
class="shipping__address"
class="address"
:name="`${userShippingGetters.getId(shippingAddress)}`"
>
<UserAddressDetails :address="shippingAddress">
Expand All @@ -23,7 +23,7 @@
:selected="value"
name="setAsDefault"
label="Use this address as my default one."
class="shipping__setAsDefault"
class="setAsDefault"
@change="$emit('input', $event)"
/>
<hr class="sf-divider">
Expand Down Expand Up @@ -95,33 +95,5 @@ export default defineComponent({
</script>

<style lang="scss" scoped>
.shipping {
&__address {
margin-bottom: var(--spacer-base);
@include for-desktop {
margin-right: var(--spacer-sm);
display: flex;
width: calc(50% - var(--spacer-sm));
flex-direction: column;
}
}

&__addresses {
margin-bottom: var(--spacer-xl);
@include for-desktop {
display: flex;
flex-wrap: wrap;
margin-right: var(--spacer-sm)
}
}

&__setAsDefault {
margin-bottom: var(--spacer-xl);
}
}

.sf-divider,
.form__action-button--margin-bottom {
margin-bottom: var(--spacer-xl);
}
@import "./styles/userAddresses";
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.address {
margin-bottom: var(--spacer-base);
@include for-desktop {
margin-right: var(--spacer-sm);
display: flex;
width: calc(50% - var(--spacer-sm));
flex-direction: column;
}
}

.addresses {
margin-bottom: var(--spacer-xl);
@include for-desktop {
display: flex;
flex-wrap: wrap;
margin-right: var(--spacer-sm)
}
}

.setAsDefault {
margin-bottom: var(--spacer-xl);
}

.sf-divider,
.form__action-button--margin-bottom {
margin-bottom: var(--spacer-xl);
}