Skip to content

Commit a90c604

Browse files
committed
enable horizontal scrolling BundlerSwitcher control
1 parent c8b2ecc commit a90c604

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/dev/s2-docs/src/BundlerSwitcher.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,13 @@ export function BundlerSwitcher({children}: BundlerSwitcherProps) {
8686

8787
return (
8888
<div className={container}>
89-
<SegmentedControl selectedKey={active?.id} onSelectionChange={onSelectionChange} styles={switcher}>
90-
{items.map(it => (
91-
<SegmentedControlItem key={it.id} id={it.id}>{it.label}</SegmentedControlItem>
92-
))}
93-
</SegmentedControl>
89+
<div className={style({overflowX: 'auto', width: 'auto', flexGrow: 1})}>
90+
<SegmentedControl selectedKey={active?.id} onSelectionChange={onSelectionChange} styles={switcher}>
91+
{items.map(it => (
92+
<SegmentedControlItem key={it.id} id={it.id}>{it.label}</SegmentedControlItem>
93+
))}
94+
</SegmentedControl>
95+
</div>
9496
{active?.content}
9597
</div>
9698
);

0 commit comments

Comments
 (0)