Skip to content

Commit

Permalink
docs: add the caretLabel property to storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
iOvergaard committed Jul 25, 2024
1 parent e9d7965 commit 3a6c679
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/uui-menu-item/lib/uui-menu-item.story.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import '.';
import '@umbraco-ui/uui-icon-registry-essential/lib';
import '@umbraco-ui/uui-symbol-expand/lib';
import '@umbraco-ui/uui-symbol-more/lib';

import { Story } from '@storybook/web-components';
import { html } from 'lit';
Expand All @@ -8,8 +10,6 @@ import { ifDefined } from 'lit/directives/if-defined.js';
import { UUIMenuItemElement } from './uui-menu-item.element';
import { UUIMenuItemEvent } from './UUIMenuItemEvent';
import readme from '../README.md?raw';
import '@umbraco-ui/uui-symbol-expand/lib';
import '@umbraco-ui/uui-symbol-more/lib';

export default {
title: 'Buttons/Menu Item',
Expand All @@ -31,6 +31,7 @@ export default {
target: undefined,
rel: undefined,
selectMode: undefined,
caretLabel: 'Expand',
},
argTypes: {
'--uui-menu-item-indent': { control: { type: 'text' } },
Expand Down Expand Up @@ -140,10 +141,13 @@ AAAOverview.parameters = {
},
};

export const Nested = () => html`
export const Nested = props => html`
${labelNames.map(
(name: string) =>
html` <uui-menu-item label="${name}" has-children>
html` <uui-menu-item
label="${name}"
.caretLabel="${props.caretLabel}"
has-children>
${renderItems()}
</uui-menu-item>`,
)}
Expand Down

0 comments on commit 3a6c679

Please sign in to comment.