From 949633623f11c6efbcffe144d73a2bb067898aa6 Mon Sep 17 00:00:00 2001 From: hiba-aldalaty Date: Wed, 24 Nov 2021 09:29:41 +0000 Subject: [PATCH] Fix tSidebar ests and storybook after merging change caused isPinned to be true by default Signed-off-by: hiba-aldalaty --- .../src/layout/Sidebar/Bar.test.tsx | 59 ++++++----- .../src/layout/Sidebar/Sidebar.stories.tsx | 99 ++++++++++--------- 2 files changed, 86 insertions(+), 72 deletions(-) diff --git a/packages/core-components/src/layout/Sidebar/Bar.test.tsx b/packages/core-components/src/layout/Sidebar/Bar.test.tsx index a4413dfd00..4d89008ea3 100644 --- a/packages/core-components/src/layout/Sidebar/Bar.test.tsx +++ b/packages/core-components/src/layout/Sidebar/Bar.test.tsx @@ -26,34 +26,43 @@ import { Sidebar, SidebarExpandButton } from './Bar'; import { SidebarItem, SidebarSearchField } from './Items'; import { SidebarSubItem } from './SidebarSubItem'; import { Submenu } from './Submenu'; +import { SidebarPinStateContext } from '.'; async function renderScalableSidebar() { await renderInTestApp( - - {}} to="/search" /> - {}} text="Catalog"> - - - - - - - - , + {} }} + > + + {}} to="/search" /> + {}} + text="Catalog" + > + + + + + + + + + , ); } diff --git a/packages/core-components/src/layout/Sidebar/Sidebar.stories.tsx b/packages/core-components/src/layout/Sidebar/Sidebar.stories.tsx index e25693cc81..978987e028 100644 --- a/packages/core-components/src/layout/Sidebar/Sidebar.stories.tsx +++ b/packages/core-components/src/layout/Sidebar/Sidebar.stories.tsx @@ -27,6 +27,7 @@ import { SidebarExpandButton, SidebarIntro, SidebarItem, + SidebarPage, SidebarSearchField, SidebarSpace, } from '.'; @@ -53,54 +54,58 @@ const handleSearch = (input: string) => { }; export const SampleSidebar = () => ( - - - - - - - - - + + + + + + + + + + + ); export const SampleScalableSidebar = () => ( - - - - {}} text="Catalog"> - - - - - - - - - - - - - - - - + + + + + {}} text="Catalog"> + + + + + + + + + + + + + + + + + );