Skip to content

Commit b60094d

Browse files
committed
feat: update jump menu to use flat structure for border styling
1 parent 242d0e8 commit b60094d

File tree

2 files changed

+15
-22
lines changed

2 files changed

+15
-22
lines changed

src/scss/components/jump-menu/_jump-menu.scss

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,15 @@
9696
}
9797
}
9898

99-
&__subitems {
100-
list-style-type: none;
101-
padding: 0;
102-
margin: 0;
103-
margin-inline-start: 0.1rem;
104-
}
105-
10699
&__subitem {
107100
line-height: 1;
108101
padding: 0.4em;
102+
padding-inline-start: 1rem;
103+
margin-left: 0.25rem;
109104
transition: all 0.2s ease-in-out;
110105

111106
&:hover {
112-
background-color: $color-green-20;
107+
background-color: $color-green-10;
113108
}
114109
}
115110

src/scss/components/jump-menu/jump-menu.stories.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,18 @@ export const WithSubMenus: Story = {
9494
${items.map((item) => {
9595
if (item.children) {
9696
return html`<li class="iati-jump-menu__item">
97-
<a href=${item.link || "#"} class="iati-jump-menu__link"
98-
>${item.text}</a
99-
>
100-
<ul class="iati-jump-menu__subitems">
101-
${item.children.map(
102-
(child) =>
103-
html`<li class="iati-jump-menu__subitem">
104-
<a href=${child.link} class="iati-jump-menu__sublink"
105-
>${child.text}</a
106-
>
107-
</li>`,
108-
)}
109-
</ul>
110-
</li>`;
97+
<a href=${item.link || "#"} class="iati-jump-menu__link"
98+
>${item.text}</a
99+
>
100+
</li>
101+
${item.children.map(
102+
(child: any) =>
103+
html`<li class="iati-jump-menu__subitem">
104+
<a href=${child.link} class="iati-jump-menu__sublink"
105+
>${child.text}</a
106+
>
107+
</li>`,
108+
)}`;
111109
} else {
112110
return html`<li class="iati-jump-menu__item">
113111
<a href=${item.link} class="iati-jump-menu__link">${item.text}</a>

0 commit comments

Comments
 (0)