{showLogo && (
{layout === 'toolbar' ? (
shouldShowIconsOnly ? (
) : (
)
) : (

)}
)}
{showSearchBox && (
<>
setSearchValue(value)}
onSearch={() => {}}
placeholder={shouldShowIconsOnly ? '' : 'Search...'}
showClearButton={!shouldShowIconsOnly}
size="small"
variant="outlined"
value={searchValue}
sx={searchSx}
/>
>
)}
{menuItems.map((item, index) => {
const listItemButton = (
{
if (item.children && item.children.length) {
toggleOpen(index);
} else {
item.onClick && item.onClick();
}
}}
disabled={item.disabled}
selected={item.active}
className={navButtonClasses}
aria-expanded={!!openMap[index]}
sx={{
minHeight: 'var(--rds-sidebar-nav-min-height, 48px)',
justifyContent: shouldShowIconsOnly ? 'center' : 'flex-start',
px: shouldShowIconsOnly ? 0 : 2,
}}
>
{item.icon && (
{item.icon}
)}
{showLabels && }
{item.children && item.children.length > 0 && !shouldShowIconsOnly && (
(openMap[index]) ? :
)}
);
return (
{shouldShowIconsOnly && item.icon ? (
{listItemButton}
) : (
listItemButton
)}
{item.children && item.children.length > 0 && (
{item.children.map((child, cIdx) => {
const childListItemButton = (
{child.icon && (
{child.icon}
)}
{showLabels && }
);
return (
{shouldShowIconsOnly && child.icon ? (
{childListItemButton}
) : (
childListItemButton
)}
);
})}
)}
);
})}
{showAvatar && (
{!shouldShowIconsOnly ? (
) : (
)}
)}