Raphaël Bosi
2025-09-25 18:14:32 +02:00
committed by GitHub
parent 9b3e2bfb45
commit 1fdfac4f0d
29 changed files with 429 additions and 307 deletions
@@ -11,7 +11,7 @@ import {
IconGauge,
IconNumber,
} from 'twenty-ui/display';
import { MenuItemCommand } from 'twenty-ui/navigation';
import { MenuItem } from 'twenty-ui/navigation';
const StyledContainer = styled.div`
display: flex;
@@ -74,7 +74,8 @@ export const CommandMenuPageLayoutGraphTypeSelect = () => {
<StyledSectionTitle>Graph type</StyledSectionTitle>
{graphTypeOptions.map((option) => (
<MenuItemCommand
<MenuItem
withIconContainer={true}
key={option.type}
LeftIcon={option.icon}
text={option.title}
@@ -6,7 +6,7 @@ import { pageLayoutDraggedAreaComponentState } from '@/page-layout/states/pageLa
import { useSetRecoilComponentState } from '@/ui/utilities/state/component-state/hooks/useSetRecoilComponentState';
import styled from '@emotion/styled';
import { IconChartPie, IconFrame, IconList } from 'twenty-ui/display';
import { MenuItemCommand } from 'twenty-ui/navigation';
import { MenuItem } from 'twenty-ui/navigation';
const StyledContainer = styled.div`
display: flex;
@@ -86,8 +86,9 @@ export const CommandMenuPageLayoutWidgetTypeSelect = () => {
<StyledContainer>
<StyledSectionTitle>Widget type</StyledSectionTitle>
{widgetTypeOptions.map((option) => {
const MenuItem = (
<MenuItemCommand
const MenuItemComponent = (
<MenuItem
withIconContainer={true}
key={option.type}
LeftIcon={option.icon}
text={option.title}
@@ -97,10 +98,10 @@ export const CommandMenuPageLayoutWidgetTypeSelect = () => {
return option.disabled ? (
<StyledDisabledMenuItem key={option.type}>
{MenuItem}
{MenuItemComponent}
</StyledDisabledMenuItem>
) : (
MenuItem
MenuItemComponent
);
})}
</StyledContainer>
@@ -2,7 +2,7 @@ import { type WorkflowActionType } from '@/workflow/types/Workflow';
import { getActionIconColorOrThrow } from '@/workflow/workflow-steps/workflow-actions/utils/getActionIconColorOrThrow';
import { useTheme } from '@emotion/react';
import { useIcons } from 'twenty-ui/display';
import { MenuItemCommand } from 'twenty-ui/navigation';
import { MenuItem } from 'twenty-ui/navigation';
type Action = { type: WorkflowActionType; label: string; icon: string };
@@ -22,7 +22,8 @@ export const WorkflowActionMenuItems = ({
const Icon = getIcon(action.icon);
return (
<MenuItemCommand
<MenuItem
withIconContainer={true}
key={action.type}
LeftIcon={() => (
<Icon
@@ -15,7 +15,7 @@ import { getTriggerDefaultDefinition } from '@/workflow/workflow-trigger/utils/g
import { useTheme } from '@emotion/react';
import { TRIGGER_STEP_ID } from 'twenty-shared/workflow';
import { useIcons } from 'twenty-ui/display';
import { MenuItemCommand } from 'twenty-ui/navigation';
import { MenuItem } from 'twenty-ui/navigation';
export const CommandMenuWorkflowSelectTriggerTypeContent = ({
workflow,
@@ -71,7 +71,8 @@ export const CommandMenuWorkflowSelectTriggerTypeContent = ({
{DATABASE_TRIGGER_TYPES.map((action) => {
const Icon = getIcon(action.icon);
return (
<MenuItemCommand
<MenuItem
withIconContainer={true}
key={action.defaultLabel}
LeftIcon={() => <Icon color={theme.color.blue} />}
text={action.defaultLabel}
@@ -86,7 +87,8 @@ export const CommandMenuWorkflowSelectTriggerTypeContent = ({
{OTHER_TRIGGER_TYPES.map((action) => {
const Icon = getIcon(action.icon);
return (
<MenuItemCommand
<MenuItem
withIconContainer={true}
key={action.defaultLabel}
LeftIcon={() => <Icon color={theme.color.purple} />}
text={action.defaultLabel}