diff --git a/lib/ui/src/app.tsx b/lib/ui/src/app.tsx index 65fbb81778b9..e017d011e9ec 100644 --- a/lib/ui/src/app.tsx +++ b/lib/ui/src/app.tsx @@ -58,11 +58,7 @@ const App = React.memo( ); if (!width || !height) { - content = ( -
- {width} x {height} -
- ); + content =
; } else if (width < 600) { content = ; } else { diff --git a/lib/ui/src/components/preview/FramesRenderer.tsx b/lib/ui/src/components/preview/FramesRenderer.tsx index 6560e75476d6..359eabb3c3de 100644 --- a/lib/ui/src/components/preview/FramesRenderer.tsx +++ b/lib/ui/src/components/preview/FramesRenderer.tsx @@ -4,6 +4,21 @@ import { IFrame } from './iframe'; import { FramesRendererProps } from './utils/types'; import { stringifyQueryParams } from './utils/stringifyQueryParams'; +const getActive = ( + refId: FramesRendererProps['refId'], + storyId: FramesRendererProps['storyId'] +) => { + if (storyId === '*') { + return undefined; + } + + if (refId) { + return `storybook-ref-${refId}`; + } + + return 'storybook-preview-iframe'; +}; + export const FramesRenderer: FunctionComponent = ({ refs, story, @@ -15,7 +30,7 @@ export const FramesRenderer: FunctionComponent = ({ storyId, }) => { const stringifiedQueryParams = stringifyQueryParams(queryParams); - const active = refId ? `storybook-ref-${refId}` : 'storybook-preview-iframe'; + const active = getActive(refId, storyId); const styles = useMemo(() => { return {