Skip to content

Commit

Permalink
fix(fake-menu): added badge support (#2336)
Browse files Browse the repository at this point in the history
  • Loading branch information
agliga authored May 17, 2024
1 parent e88813a commit 800681a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/khaki-fans-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ebay/skin": minor
---

fake-menu: added badge suport
1 change: 1 addition & 0 deletions dist/menu/menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ span.fake-menu__items {
}
.menu__item > svg.icon--tick-16:last-child,
.fake-menu__item > svg.icon--tick-16:last-child,
.fake-menu__item .badge,
.menu__item .badge {
margin-left: var(--spacing-100);
margin-right: var(--spacing-100);
Expand Down
1 change: 1 addition & 0 deletions src/less/menu/menu.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ span.fake-menu__items {

.menu__item > svg.icon--tick-16:last-child,
.fake-menu__item > svg.icon--tick-16:last-child,
.fake-menu__item .badge,
.menu__item .badge {
margin-left: var(--spacing-100);
margin-right: var(--spacing-100);
Expand Down
10 changes: 10 additions & 0 deletions src/less/menu/stories/fake-menu.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,13 @@ export const buttonsDisabled = () => `
</ul>
</div>
`;

export const badged = () => `
<span class="fake-menu">
<span class="fake-menu__items" role="menu">
<a class="fake-menu__item fake-menu__item--badged" role="menuitem" href="https://www.ebay.com"><span>Button 1<span class="badge">1</span></span></a>
<a class="fake-menu__item fake-menu__item--badged" role="menuitem" href="https://www.ebay.com"><span>Button 2<span class="badge">10</span></span></a>
<a class="fake-menu__item fake-menu__item--badged" role="menuitem" href="https://www.ebay.com"><span>Button 3<span class="badge">99+</span></span></a>
</span>
</span>
`;

0 comments on commit 800681a

Please sign in to comment.