Skip to content

Commit 0487f38

Browse files
authored
fix: S2 Tabs collapsing with a single word (#8765)
1 parent ad255f4 commit 0487f38

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/@react-spectrum/s2/src/Tabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ const tablist = style({
213213

214214
const tablistWrapper = style({
215215
position: 'relative',
216-
minWidth: 'min',
216+
minWidth: 0,
217217
flexShrink: 0,
218218
flexGrow: 0
219219
}, getAllowedOverrides());

packages/@react-spectrum/s2/stories/Tabs.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ export const Example: Story = {
4747
<div className={style({width: 700, maxWidth: 'calc(100vw - 60px)', height: 256, resize: 'horizontal', overflow: 'hidden', padding: 8})}>
4848
<Tabs {...args} styles={tabs} aria-label="History of Ancient Rome">
4949
<TabList styles={tabList({orientation: args.orientation})}>
50-
<Tab id="FoR">Founding of Rome</Tab>
51-
<Tab id="MaR">Monarchy and Republic</Tab>
52-
<Tab id="Emp">Empire</Tab>
50+
<Tab id="FoR">Home</Tab>
51+
<Tab id="MaR">Search</Tab>
52+
<Tab id="Emp">Settings</Tab>
5353
</TabList>
5454
<TabPanel id="FoR">
5555
<div className={style({overflow: 'auto', height: 'full'})}>

0 commit comments

Comments
 (0)