Skip to content

Commit a4f32d3

Browse files
Merge pull request #77 from Shopify/jb-add-customer-account-menu
Add customer account menu web component
2 parents 04069e0 + 1267a59 commit a4f32d3

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

assets/icon-account.svg

Lines changed: 2 additions & 2 deletions
Loading

locales/en.default.schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"input_corner_radius": "Input corner radius",
4343
"layout_direction": "Layout direction",
4444
"menu": "Menu",
45+
"customer_account_menu": "Customer account menu",
4546
"padding": "Padding",
4647
"page_margin": "Page margin",
4748
"page_width": "Page width",

sections/header.liquid

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
<div class="header__icons">
1313
{% if shop.customer_accounts_enabled %}
14-
{{ 'icon-account.svg' | inline_asset_content | link_to: routes.account_url }}
14+
<shopify-account menu="{{ section.settings.customer_account_menu }}">
15+
{{ 'icon-account.svg' | inline_asset_content }}
16+
</shopify-account>
1517
{% endif %}
1618

1719
<a href="{{ routes.cart_url }}">
@@ -35,6 +37,9 @@
3537
position: relative;
3638
text-decoration: none;
3739
color: var(--color-foreground);
40+
display: flex;
41+
align-items: center;
42+
justify-content: center;
3843
}
3944
header a sup {
4045
position: absolute;
@@ -60,6 +65,12 @@
6065
"type": "link_list",
6166
"id": "menu",
6267
"label": "t:labels.menu"
68+
},
69+
{
70+
"type": "link_list",
71+
"id": "customer_account_menu",
72+
"label": "t:labels.customer_account_menu",
73+
"default": "customer-account-main-menu"
6374
}
6475
]
6576
}

0 commit comments

Comments
 (0)