Skip to content

Commit 3e913be

Browse files
committed
docs(hub-ui): add stories for the expanded group sidebar
1 parent f6a6560 commit 3e913be

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

‎packages/hub-ui/src/client/components/dock/DockGroupSidebar.stories.ts‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,42 @@ export const Overflow: Story = {
7373
),
7474
}),
7575
}
76+
77+
/**
78+
* `expandGroupSidebar` on: a wider rail that shows each member's title next
79+
* to its icon, so tools are findable without hovering for tooltips.
80+
*/
81+
export const Expanded: Story = {
82+
render: () => ({
83+
setup: () => mountWithContext(
84+
{
85+
entries: groupedEntries,
86+
selectedId: 'nuxt:overview',
87+
settings: { expandGroupSidebar: true },
88+
},
89+
ctx => stage(shell(h(DockGroupSidebar, {
90+
context: ctx,
91+
group: nuxtGroup,
92+
selectedId: ctx.docks.selectedId,
93+
}))),
94+
),
95+
}),
96+
}
97+
98+
/** Expanded with overflow: the show-more row keeps its label and count. */
99+
export const ExpandedOverflow: Story = {
100+
render: () => ({
101+
setup: () => mountWithContext(
102+
{
103+
entries: subcategorizedGroupEntries,
104+
selectedId: 'tools:graph',
105+
settings: { expandGroupSidebar: true },
106+
},
107+
ctx => stage(shell(h(DockGroupSidebar, {
108+
context: ctx,
109+
group: toolsGroup,
110+
selectedId: ctx.docks.selectedId,
111+
}), 'h-44')),
112+
),
113+
}),
114+
}

0 commit comments

Comments
 (0)