diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowEditActionFormBuilder.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowEditActionFormBuilder.tsx index f0892de64..a1d4e2d72 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowEditActionFormBuilder.tsx +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowEditActionFormBuilder.tsx @@ -14,7 +14,7 @@ import { getDefaultFormFieldSettings } from '@/workflow/workflow-steps/workflow- import { useActionHeaderTypeOrThrow } from '@/workflow/workflow-steps/workflow-actions/hooks/useActionHeaderTypeOrThrow'; import { useActionIconColorOrThrow } from '@/workflow/workflow-steps/workflow-actions/hooks/useActionIconColorOrThrow'; import { getActionIcon } from '@/workflow/workflow-steps/workflow-actions/utils/getActionIcon'; -import { useTheme } from '@emotion/react'; +import { css, useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { OnDragEndResponder } from '@hello-pangea/dnd'; import { useLingui } from '@lingui/react/macro'; @@ -88,7 +88,9 @@ const StyledOpenedSettingsContainer = styled.div` grid-area: settings; `; -const StyledFieldContainer = styled.div` +const StyledFieldContainer = styled.div<{ + readonly?: boolean; +}>` align-items: center; background: transparent; border: none; @@ -97,12 +99,16 @@ const StyledFieldContainer = styled.div` padding-inline: ${({ theme }) => theme.spacing(2)}; width: 100%; - cursor: pointer; + cursor: ${({ readonly }) => (readonly ? 'default' : 'pointer')}; - &:hover, - &[data-open='true'] { - background-color: ${({ theme }) => theme.background.transparent.lighter}; - } + ${({ readonly, theme }) => + !readonly && + css` + &:hover, + &[data-open='true'] { + background-color: ${theme.background.transparent.lighter}; + } + `} `; const StyledPlaceholder = styled.div` @@ -285,7 +291,9 @@ export const WorkflowEditActionFormBuilder = ({ handleFieldClick(field.id); }} > - + {isDefined(field.placeholder) && isNonEmptyString(field.placeholder)