New PR with right sign off

Signed-off-by: Rakesh Thera <v-rthera@expediagroup.com>
This commit is contained in:
Rakesh Thera
2022-04-22 19:44:29 +05:30
parent ced26dbec3
commit 6735bd3ea1
@@ -369,6 +369,18 @@ const SidebarItemBase = forwardRef<any, SidebarItemProps>((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 = (
<>
<div style={divStyle}>
<Icon fontSize="small" />
{!isOpen && children ? <ArrowRightIcon /> : <></>}
</div>
</>
);
const itemIcon = (
<Badge
color="secondary"
@@ -378,6 +390,7 @@ const SidebarItemBase = forwardRef<any, SidebarItemProps>((props, ref) => {
className={classnames({ [classes.closedItemIcon]: !isOpen })}
>
<Icon fontSize="small" />
{displayItemIcon}
</Badge>
);