From 6735bd3ea14cd3ba16472a5939b6632de556dc8a Mon Sep 17 00:00:00 2001 From: Rakesh Thera Date: Fri, 22 Apr 2022 19:44:29 +0530 Subject: [PATCH] New PR with right sign off Signed-off-by: Rakesh Thera --- .../core-components/src/layout/Sidebar/Items.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/core-components/src/layout/Sidebar/Items.tsx b/packages/core-components/src/layout/Sidebar/Items.tsx index 4a0376946a..b227d81dc1 100644 --- a/packages/core-components/src/layout/Sidebar/Items.tsx +++ b/packages/core-components/src/layout/Sidebar/Items.tsx @@ -369,6 +369,18 @@ const SidebarItemBase = forwardRef((props, ref) => { // Still waiting on a Q answered to fine tune the implementation const { isOpen } = useContext(SidebarContext); + const divStyle = + !isOpen && children ? { marginLeft: '24px', marginBottom: '4px' } : {}; + + const displayItemIcon = ( + <> +
+ + {!isOpen && children ? : <>} +
+ + ); + const itemIcon = ( ((props, ref) => { className={classnames({ [classes.closedItemIcon]: !isOpen })} > + {displayItemIcon} );