From 215f2d82e96d77ac34b63bd08d935741a9d46dec Mon Sep 17 00:00:00 2001 From: Abdul Rahman Date: Thu, 19 Feb 2026 02:50:42 +0530 Subject: [PATCH] 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. --- .../components/NavigationDrawerSectionForWorkspaceItems.tsx | 1 + .../navigation-drawer/components/NavigationDrawerItem.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerSectionForWorkspaceItems.tsx b/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerSectionForWorkspaceItems.tsx index dbde06ee838..05ff8007236 100644 --- a/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerSectionForWorkspaceItems.tsx +++ b/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerSectionForWorkspaceItems.tsx @@ -333,6 +333,7 @@ export const NavigationDrawerSectionForWorkspaceItems = ({ label={t`Add menu item`} onClick={onAddMenuItem} triggerEvent="CLICK" + usePlainIcon /> )} diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItem.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItem.tsx index 6a24926df08..8288fb2230a 100644 --- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItem.tsx +++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItem.tsx @@ -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 ? (