Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Refine the address edit / delete buttons.

Matthew Kennedy2946c8048b85
diff --git a/frontend/app/assets/stylesheets/spree/frontend/views/spree/shared/address_book.scss b/frontend/app/assets/stylesheets/spree/frontend/views/spree/shared/address_book.scss
index 732c72ae1d..ea94ef52dc 100644
--- a/frontend/app/assets/stylesheets/spree/frontend/views/spree/shared/address_book.scss
+++ b/frontend/app/assets/stylesheets/spree/frontend/views/spree/shared/address_book.scss
@@ -1,7 +1,9 @@
-.address-button svg {
- color: $primary-color;
- cursor: pointer;
- &:hover {
- color: darken($primary-color, 10);
+.js-delete-address-link {
+ svg {
+ color: $primary-color;
+ cursor: pointer;
+ &:hover {
+ color: darken($primary-color, 10);
+ }
}
}
diff --git a/frontend/app/views/spree/users/_address_controls.html.erb b/frontend/app/views/spree/users/_address_controls.html.erb
index 515bf8741d..a83212f7d7 100644
--- a/frontend/app/views/spree/users/_address_controls.html.erb
+++ b/frontend/app/views/spree/users/_address_controls.html.erb
@@ -1,8 +1,7 @@
-<span class="mx-2">
- <%= link_to spree.edit_address_path(address), method: :get, class: 'address-button', data: { hook: 'edit_address' } do %>
- <%= inline_svg_tag('edit.svg', width: 27.6, height: 24) %>
- <% end %>
-</span>
-<span class="bg-transparent border-0 p-0 m-0 address-button delete-button js-delete-address-link" data-address="<%= spree.address_path(address) %>">
- <%= inline_svg_tag('garbage_2.svg', width: 27.6, height: 24) %>
+<%= link_to(spree.edit_address_path(address), method: :get, class: 'ml-3 d-inline-block', data: { hook: 'edit_address' }) do %>
+ <%= inline_svg_tag('edit.svg', width: 24, height: 24) %>
+<% end %>
+
+<span class="js-delete-address-link ml-3" data-address="<%= spree.address_path(address) %>">
+ <%= inline_svg_tag('garbage_2.svg', width: 24, height: 24) %>
</span>