Skip to content

Commit

Permalink
put the with tabs story back the way it was
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanKolnik committed Apr 8, 2022
1 parent 24c5dc7 commit 2317c2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
17 changes: 1 addition & 16 deletions lib/ui/src/components/preview/preview.stories.tsx
Expand Up @@ -144,22 +144,7 @@ export const WithCanvasTab = () => (
</Consumer>
);

export const WithTabs = () => (
<Consumer>
{({ api }: Combo) => {
return (
<Preview
{...previewProps}
api={{
...api,
getElements: () => ({}),
getQueryParam: () => '',
}}
/>
);
}}
</Consumer>
);
export const WithTabs = () => <Preview {...previewProps} />;

export const WithToolbarExclusions = () => (
<Consumer>
Expand Down
7 changes: 4 additions & 3 deletions lib/ui/src/components/preview/toolbar.tsx
Expand Up @@ -132,9 +132,10 @@ const useTools = (
[defaultToolsExtra, toolsExtraFromConfig]
);

const toolbarExclusions = getQueryParam(TOOLBAR_EXCLUSION_PARAM)
? getQueryParam(TOOLBAR_EXCLUSION_PARAM).split(',')
: [];
const toolbarExclusions: string[] =
getQueryParam && getQueryParam(TOOLBAR_EXCLUSION_PARAM)
? getQueryParam(TOOLBAR_EXCLUSION_PARAM).split(',')
: [];

return useMemo(() => {
return story && story.parameters
Expand Down

0 comments on commit 2317c2a

Please sign in to comment.