From 2317c2ad6b201de2840050037f26bc8151a95c4b Mon Sep 17 00:00:00 2001
From: Jono Kolnik <1164060+JonathanKolnik@users.noreply.github.com>
Date: Fri, 8 Apr 2022 14:45:45 -0400
Subject: [PATCH] put the with tabs story back the way it was
---
.../src/components/preview/preview.stories.tsx | 17 +----------------
lib/ui/src/components/preview/toolbar.tsx | 7 ++++---
2 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/lib/ui/src/components/preview/preview.stories.tsx b/lib/ui/src/components/preview/preview.stories.tsx
index a4277eda4c80..439a70e07735 100644
--- a/lib/ui/src/components/preview/preview.stories.tsx
+++ b/lib/ui/src/components/preview/preview.stories.tsx
@@ -144,22 +144,7 @@ export const WithCanvasTab = () => (
);
-export const WithTabs = () => (
-
- {({ api }: Combo) => {
- return (
- ({}),
- getQueryParam: () => '',
- }}
- />
- );
- }}
-
-);
+export const WithTabs = () => ;
export const WithToolbarExclusions = () => (
diff --git a/lib/ui/src/components/preview/toolbar.tsx b/lib/ui/src/components/preview/toolbar.tsx
index 538e2b6de47e..bf14a543fe9e 100644
--- a/lib/ui/src/components/preview/toolbar.tsx
+++ b/lib/ui/src/components/preview/toolbar.tsx
@@ -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