Skip to content

Commit dfe313c

Browse files
fix(menu): add standard story for picker chromatic view
1 parent 00b00f2 commit dfe313c

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

components/menu/stories/menu.stories.js

+21-6
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ export default {
127127
],
128128
};
129129

130-
const ChromaticDefaultMenu = (args) => {
131-
const defaultMenuData = [
130+
const ChromaticMenuWithVariants = (args) => {
131+
const menuData = [
132132
{
133133
stateTitle: "No selection",
134134
args: { ...args, selectionMode: "none" },
@@ -146,7 +146,7 @@ const ChromaticDefaultMenu = (args) => {
146146
args: { ...args, selectionMode: "multiple" },
147147
},
148148
];
149-
return defaultMenuData.map((item) => html`
149+
return menuData.map((item) => html`
150150
<div class="spectrum-Typography">
151151
${Typography({
152152
semantics: "detail",
@@ -161,9 +161,9 @@ const ChromaticDefaultMenu = (args) => {
161161
`);
162162
};
163163

164-
export const Default = (args) => window.isChromatic() ?
165-
ChromaticDefaultMenu(args) : Template(args);
166-
Default.args = {
164+
export const MenuWithVariants = (args) => window.isChromatic() ?
165+
ChromaticMenuWithVariants(args) : Template(args);
166+
MenuWithVariants.args = {
167167
role: "listbox",
168168
subrole: "option",
169169
customStyles: { maxWidth: "400px" },
@@ -626,3 +626,18 @@ MenuItemOnly.argTypes = {
626626
if: { arg: "hasItemDescription", truthy: true },
627627
},
628628
};
629+
630+
export const Default = Template.bind({});
631+
Default.storyName = "Standard with Dividers";
632+
Default.args = {
633+
items: [
634+
{ label: "Deselect" },
635+
{ label: "Select inverse" },
636+
{ label: "Feather" },
637+
{ label: "Select and mask" },
638+
{ type: "divider" },
639+
{ label: "Save selection" },
640+
{ label: "Make work path", isDisabled: true },
641+
],
642+
hasDividers: true,
643+
};

0 commit comments

Comments
 (0)