is needed because SizingWindow has overflow:hidden */}
+
+
+
+ {tabs.map(tab => (
+ {tab.label}
+ ))}
+
+
+
+
+
+ );
+ });
+
+ story('Default Value', () => (
+
+
+ Set {''}
+
+
+
+
+ {TABS.map(tab => (
+ {tab.label}
+ ))}
+
+
+ {TABS.map(tab => (
+ {tab.content}
+ ))}
+
+
+
+
+ ));
+
+ story('Controlled Value', () => {
+ const [selected, setSelected] = useState('two');
+ return (
+
+
+ If you want to control the state of the tabs from outside, you can call{' '}
+ {'useState()'} and set{' '}
+ {' ...}>'} manually.
+
+
+ This is useful if you want to detect button clicks and do something different.{' '}
+ The {''} context wrapper is not required in this case.
+
+ selected={selected}
+
+
+
+ {TABS.map(tab => (
+ {tab.label}
+ ))}
+
+
+ {TABS.map(tab => (
+ {tab.content}
+ ))}
+
+
+
+
+ );
+ });
+
+ story('Rendering', () => (
+
(
+
+
+ {TABS.map(tab => (
+ {tab.label}
+ ))}
+
+
+ {TABS.map(tab => (
+ {tab.content}
+ ))}
+
+
+ )}
+ propMatrix={{
+ orientation: ['horizontal', 'vertical'],
+ hideBorder: [false, true],
+ }}
+ selectedProps={['orientation', 'hideBorder']}
+ />
+ ));
+
+ story('Disabled', () => (
+
+
+
+ Use <Tabs disabled> to disable everything.
+
+
+
+
+ {TABS.map(tab => (
+ {tab.label}
+ ))}
+
+
+ {TABS.map(tab => (
+ {tab.content}
+ ))}
+
+
+
+
+
+
+ Use {''} to disable individual{' '}
+ {''} children.
+
+
+
+
+ {TABS.map(tab => (
+ {tab.label}
+ ))}
+
+
+ {TABS.map(tab => (
+ {tab.content}
+ ))}
+
+
+
+
+
+ ));
+});
diff --git a/static/app/stories/storyBook.tsx b/static/app/stories/storyBook.tsx
index 31e142985dd039..1a247a2a2969cd 100644
--- a/static/app/stories/storyBook.tsx
+++ b/static/app/stories/storyBook.tsx
@@ -45,6 +45,10 @@ export default function storyBook(rootName: string, setup: SetupFn) {
const Story = styled('section')`
margin-bottom: ${space(4)};
+
+ & > p {
+ margin: ${space(3)} 0;
+ }
`;
const StoryTitle = styled('h4')`