Add usePlainIcon prop to NavigationDrawerItem and update NavigationDrawerSectionForWorkspaceItems

- Introduced the usePlainIcon prop in NavigationDrawerItem to allow for simplified icon rendering.
- Updated NavigationDrawerSectionForWorkspaceItems to utilize the new usePlainIcon prop, enhancing customization options for menu items.

These changes improve the flexibility and visual consistency of the navigation drawer components.
This commit is contained in:
Abdul Rahman
2026-02-19 02:50:42 +05:30
parent 78edbc2f9e
commit 215f2d82e9
2 changed files with 4 additions and 1 deletions
@@ -333,6 +333,7 @@ export const NavigationDrawerSectionForWorkspaceItems = ({
label={t`Add menu item`}
onClick={onAddMenuItem}
triggerEvent="CLICK"
usePlainIcon
/>
)}
</NavigationItemDropTarget>
@@ -60,6 +60,7 @@ export type NavigationDrawerItemProps = {
mouseUpNavigation?: boolean;
preventCollapseOnMobile?: boolean;
isSelectedInEditMode?: boolean;
usePlainIcon?: boolean;
};
type StyledItemProps = Pick<
@@ -308,6 +309,7 @@ export const NavigationDrawerItem = ({
mouseUpNavigation = false,
preventCollapseOnMobile = false,
isSelectedInEditMode = false,
usePlainIcon = false,
}: NavigationDrawerItemProps) => {
const theme = useTheme();
const isMobile = useIsMobile();
@@ -387,7 +389,7 @@ export const NavigationDrawerItem = ({
)}
{Icon &&
(isNavigationMenuItemEditingEnabled ? (
(isNavigationMenuItemEditingEnabled && !usePlainIcon ? (
<StyledIcon>
<NavigationMenuItemStyleIcon Icon={Icon} color={iconColor} />
</StyledIcon>