From 9e967414c4baae4e5626a22aadb9e8c315bba1fd Mon Sep 17 00:00:00 2001 From: JonasBa Date: Thu, 29 May 2025 14:55:58 -0400 Subject: [PATCH] storybook: export apireference on storybook namespace --- static/app/stories/index.tsx | 1 + static/app/stories/storybook.tsx | 11 +++-------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/static/app/stories/index.tsx b/static/app/stories/index.tsx index 44b328bec1d639..ee1cead7aa6724 100644 --- a/static/app/stories/index.tsx +++ b/static/app/stories/index.tsx @@ -5,3 +5,4 @@ export {SideBySide} from './layout'; export {SizingWindow, Grid} from './layout'; export {story} from './storybook'; export {ThemeSwitcher, ThemeToggle} from './theme'; +export {APIReference} from './apiReference'; diff --git a/static/app/stories/storybook.tsx b/static/app/stories/storybook.tsx index baefa7a1935ac4..a61f2d620870e0 100644 --- a/static/app/stories/storybook.tsx +++ b/static/app/stories/storybook.tsx @@ -4,8 +4,7 @@ import styled from '@emotion/styled'; import {space} from 'sentry/styles/space'; -import {APIReference} from './apiReference'; -import * as StorybookLayout from './layout'; +import * as Storybook from './'; type StoryRenderFunction = () => ReactNode | ReactNode[]; type StoryContext = (storyName: string, story: StoryRenderFunction) => void; @@ -41,7 +40,7 @@ export function story(title: string, setup: SetupFunction): StoryRenderFunction ))} {APIDocumentation.map((documentation, i) => ( - + ))} ); @@ -55,11 +54,7 @@ function Story(props: {name: string; render: StoryRenderFunction}) { return ( {props.name} - {isOneChild ? ( - children - ) : ( - {children} - )} + {isOneChild ? children : {children}} ); }