Skip to content

Commit f8cf085

Browse files
committed
add story for badge
1 parent d9c8207 commit f8cf085

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

packages/uui-menu-item/lib/uui-menu-item.story.ts

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,6 @@ export const WithActions = () =>
237237
menuItem =>
238238
html`
239239
<uui-menu-item label="${menuItem.title}">
240-
${menuItem.badge
241-
? html`<uui-badge slot="badge" look="warning">!</uui-badge>`
242-
: ''}
243240
<uui-action-bar slot="actions">
244241
<uui-button label="Open actions menu"
245242
><uui-symbol-more></uui-symbol-more
@@ -265,6 +262,31 @@ WithActions.parameters = {
265262
},
266263
};
267264

265+
export const WithBadge = () =>
266+
html`
267+
${MenuItems.map(
268+
menuItem =>
269+
html`
270+
<uui-menu-item label="${menuItem.title}">
271+
${menuItem.badge
272+
? html`<uui-badge slot="badge" look="warning">!</uui-badge>`
273+
: ''}
274+
</uui-menu-item>
275+
`
276+
)}
277+
`;
278+
WithBadge.parameters = {
279+
docs: {
280+
source: {
281+
code: html`
282+
<uui-menu-item label="Menu Item 2">
283+
<uui-badge slot="badge" look="warning">!</uui-badge>
284+
</uui-menu-item>
285+
`.strings,
286+
},
287+
},
288+
};
289+
268290
export const Selectable = () =>
269291
html`
270292
${MenuItems.map(

0 commit comments

Comments
 (0)