Skip to content

Commit f12a11f

Browse files
docs(appframesidenav): add divider support and custom content
1 parent 8002430 commit f12a11f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

components/appframesidenav/stories/appframesidenav.stories.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ export default {
4242
},
4343
control: "text",
4444
},
45+
showDividers: {
46+
name: "Show dividers",
47+
description: "Displays dividers between navigation sections.",
48+
table: {
49+
type: { summary: "boolean" },
50+
defaultValue: { summary: false },
51+
category: "Component",
52+
},
53+
type: { required: true },
54+
control: "boolean",
55+
},
4556
items: {
4657
name: "Navigation items",
4758
description: "Array of objects with `label` and `workflowIconName`. Optionally, `isCurrent` marks the current page. `isEndSectionBoundary` marks the first nav item that should be aligned at the optional bottom \"end section\"; this should only be applied to one item.",
@@ -51,13 +62,15 @@ export default {
5162
type: { required: true },
5263
control: "object",
5364
},
65+
customContent: { table: { disable: true } },
5466
},
5567
args: {
5668
rootClass: "spectrum-AppFrameSideNav",
5769
showTopButton: true,
5870
topButtonText: "Create",
5971
items: defaultSideNavItems,
6072
isMinimized: false,
73+
showDividers: false,
6174
},
6275
};
6376

@@ -98,3 +111,27 @@ export const Minimized = Template.bind({});
98111
Minimized.args = {
99112
isMinimized: true,
100113
};
114+
115+
export const Dividers = Template.bind({});
116+
Dividers.args = {
117+
showDividers: true,
118+
};
119+
Dividers.storyName = "With navigation dividers";
120+
121+
export const CustomContent = Template.bind({});
122+
CustomContent.args = {
123+
showDividers: true,
124+
customContent: [
125+
{
126+
label: "All photos",
127+
workflowIconName: "Image",
128+
isExpanded: true,
129+
tier: 0,
130+
},
131+
{
132+
label: "Publish",
133+
workflowIconName: "Publish",
134+
tier: 1,
135+
},
136+
],
137+
};

0 commit comments

Comments
 (0)