Fix design to match figma (#9864)
As title Fixes https://discord.com/channels/1130383047699738754/1331212573902770228 ## Before  ## After 
This commit is contained in:
@ -0,0 +1,13 @@
|
|||||||
|
import styled from '@emotion/styled';
|
||||||
|
|
||||||
|
const StyledStepListContainer = styled.div`
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
padding-block: ${({ theme }) => theme.spacing(1)};
|
||||||
|
padding-inline: ${({ theme }) => theme.spacing(2)};
|
||||||
|
`;
|
||||||
|
|
||||||
|
export { StyledStepListContainer as RightDrawerStepListContainer };
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
import styled from '@emotion/styled';
|
||||||
|
|
||||||
|
const StyledSelectStepTitle = styled.span`
|
||||||
|
color: ${({ theme }) => theme.font.color.tertiary};
|
||||||
|
font-size: ${({ theme }) => theme.font.size.sm};
|
||||||
|
font-weight: ${({ theme }) => theme.font.weight.medium};
|
||||||
|
padding-top: ${({ theme }) => theme.spacing(2)};
|
||||||
|
padding-bottom: ${({ theme }) => theme.spacing(1)};
|
||||||
|
padding-left: ${({ theme }) => theme.spacing(1)};
|
||||||
|
padding-right: ${({ theme }) => theme.spacing(1)};
|
||||||
|
`;
|
||||||
|
|
||||||
|
export { StyledSelectStepTitle as RightDrawerWorkflowSelectStepTitle };
|
||||||
@ -2,28 +2,9 @@ import { WorkflowWithCurrentVersion } from '@/workflow/types/Workflow';
|
|||||||
import { useCreateStep } from '@/workflow/workflow-steps/hooks/useCreateStep';
|
import { useCreateStep } from '@/workflow/workflow-steps/hooks/useCreateStep';
|
||||||
import { OTHER_ACTIONS } from '@/workflow/workflow-steps/workflow-actions/constants/OtherActions';
|
import { OTHER_ACTIONS } from '@/workflow/workflow-steps/workflow-actions/constants/OtherActions';
|
||||||
import { RECORD_ACTIONS } from '@/workflow/workflow-steps/workflow-actions/constants/RecordActions';
|
import { RECORD_ACTIONS } from '@/workflow/workflow-steps/workflow-actions/constants/RecordActions';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import { MenuItemCommand, useIcons } from 'twenty-ui';
|
import { MenuItemCommand, useIcons } from 'twenty-ui';
|
||||||
|
import { RightDrawerStepListContainer } from '@/workflow/workflow-steps/components/RightDrawerWorkflowSelectStepContainer';
|
||||||
const StyledActionListContainer = styled.div`
|
import { RightDrawerWorkflowSelectStepTitle } from '@/workflow/workflow-steps/components/RightDrawerWorkflowSelectStepTitle';
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 100%;
|
|
||||||
overflow-y: auto;
|
|
||||||
|
|
||||||
padding-block: ${({ theme }) => theme.spacing(1)};
|
|
||||||
padding-inline: ${({ theme }) => theme.spacing(2)};
|
|
||||||
`;
|
|
||||||
|
|
||||||
const StyledSectionTitle = styled.span`
|
|
||||||
color: ${({ theme }) => theme.font.color.tertiary};
|
|
||||||
font-size: ${({ theme }) => theme.font.size.sm};
|
|
||||||
font-weight: ${({ theme }) => theme.font.weight.medium};
|
|
||||||
padding-top: ${({ theme }) => theme.spacing(2)};
|
|
||||||
padding-bottom: ${({ theme }) => theme.spacing(1)};
|
|
||||||
padding-left: ${({ theme }) => theme.spacing(1)};
|
|
||||||
padding-right: ${({ theme }) => theme.spacing(1)};
|
|
||||||
`;
|
|
||||||
|
|
||||||
export const RightDrawerWorkflowSelectActionContent = ({
|
export const RightDrawerWorkflowSelectActionContent = ({
|
||||||
workflow,
|
workflow,
|
||||||
@ -36,8 +17,10 @@ export const RightDrawerWorkflowSelectActionContent = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledActionListContainer>
|
<RightDrawerStepListContainer>
|
||||||
<StyledSectionTitle>Records</StyledSectionTitle>
|
<RightDrawerWorkflowSelectStepTitle>
|
||||||
|
Records
|
||||||
|
</RightDrawerWorkflowSelectStepTitle>
|
||||||
{RECORD_ACTIONS.map((action) => (
|
{RECORD_ACTIONS.map((action) => (
|
||||||
<MenuItemCommand
|
<MenuItemCommand
|
||||||
key={action.type}
|
key={action.type}
|
||||||
@ -46,7 +29,9 @@ export const RightDrawerWorkflowSelectActionContent = ({
|
|||||||
onClick={() => createStep(action.type)}
|
onClick={() => createStep(action.type)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
<StyledSectionTitle>Other</StyledSectionTitle>
|
<RightDrawerWorkflowSelectStepTitle>
|
||||||
|
Other
|
||||||
|
</RightDrawerWorkflowSelectStepTitle>
|
||||||
{OTHER_ACTIONS.map((action) => (
|
{OTHER_ACTIONS.map((action) => (
|
||||||
<MenuItemCommand
|
<MenuItemCommand
|
||||||
key={action.type}
|
key={action.type}
|
||||||
@ -55,6 +40,6 @@ export const RightDrawerWorkflowSelectActionContent = ({
|
|||||||
onClick={() => createStep(action.type)}
|
onClick={() => createStep(action.type)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</StyledActionListContainer>
|
</RightDrawerStepListContainer>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -8,29 +8,10 @@ import { OTHER_TRIGGER_TYPES } from '@/workflow/workflow-trigger/constants/Other
|
|||||||
import { TRIGGER_STEP_ID } from '@/workflow/workflow-trigger/constants/TriggerStepId';
|
import { TRIGGER_STEP_ID } from '@/workflow/workflow-trigger/constants/TriggerStepId';
|
||||||
import { useUpdateWorkflowVersionTrigger } from '@/workflow/workflow-trigger/hooks/useUpdateWorkflowVersionTrigger';
|
import { useUpdateWorkflowVersionTrigger } from '@/workflow/workflow-trigger/hooks/useUpdateWorkflowVersionTrigger';
|
||||||
import { getTriggerDefaultDefinition } from '@/workflow/workflow-trigger/utils/getTriggerDefaultDefinition';
|
import { getTriggerDefaultDefinition } from '@/workflow/workflow-trigger/utils/getTriggerDefaultDefinition';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import { useSetRecoilState } from 'recoil';
|
import { useSetRecoilState } from 'recoil';
|
||||||
import { MenuItem, useIcons } from 'twenty-ui';
|
import { MenuItemCommand, useIcons } from 'twenty-ui';
|
||||||
|
import { RightDrawerStepListContainer } from '@/workflow/workflow-steps/components/RightDrawerWorkflowSelectStepContainer';
|
||||||
const StyledActionListContainer = styled.div`
|
import { RightDrawerWorkflowSelectStepTitle } from '@/workflow/workflow-steps/components/RightDrawerWorkflowSelectStepTitle';
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 100%;
|
|
||||||
overflow-y: auto;
|
|
||||||
|
|
||||||
padding-block: ${({ theme }) => theme.spacing(1)};
|
|
||||||
padding-inline: ${({ theme }) => theme.spacing(2)};
|
|
||||||
`;
|
|
||||||
|
|
||||||
const StyledSectionTitle = styled.span`
|
|
||||||
color: ${({ theme }) => theme.font.color.tertiary};
|
|
||||||
font-size: ${({ theme }) => theme.font.size.sm};
|
|
||||||
font-weight: ${({ theme }) => theme.font.weight.medium};
|
|
||||||
padding-top: ${({ theme }) => theme.spacing(2)};
|
|
||||||
padding-bottom: ${({ theme }) => theme.spacing(1)};
|
|
||||||
padding-left: ${({ theme }) => theme.spacing(1)};
|
|
||||||
padding-right: ${({ theme }) => theme.spacing(1)};
|
|
||||||
`;
|
|
||||||
|
|
||||||
export const RightDrawerWorkflowSelectTriggerTypeContent = ({
|
export const RightDrawerWorkflowSelectTriggerTypeContent = ({
|
||||||
workflow,
|
workflow,
|
||||||
@ -46,10 +27,12 @@ export const RightDrawerWorkflowSelectTriggerTypeContent = ({
|
|||||||
const setWorkflowSelectedNode = useSetRecoilState(workflowSelectedNodeState);
|
const setWorkflowSelectedNode = useSetRecoilState(workflowSelectedNodeState);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledActionListContainer>
|
<RightDrawerStepListContainer>
|
||||||
<StyledSectionTitle>Data</StyledSectionTitle>
|
<RightDrawerWorkflowSelectStepTitle>
|
||||||
|
Data
|
||||||
|
</RightDrawerWorkflowSelectStepTitle>
|
||||||
{DATABASE_TRIGGER_TYPES.map((action) => (
|
{DATABASE_TRIGGER_TYPES.map((action) => (
|
||||||
<MenuItem
|
<MenuItemCommand
|
||||||
key={action.defaultLabel}
|
key={action.defaultLabel}
|
||||||
LeftIcon={getIcon(action.icon)}
|
LeftIcon={getIcon(action.icon)}
|
||||||
text={action.defaultLabel}
|
text={action.defaultLabel}
|
||||||
@ -71,9 +54,11 @@ export const RightDrawerWorkflowSelectTriggerTypeContent = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
<StyledSectionTitle>Others</StyledSectionTitle>
|
<RightDrawerWorkflowSelectStepTitle>
|
||||||
|
Others
|
||||||
|
</RightDrawerWorkflowSelectStepTitle>
|
||||||
{OTHER_TRIGGER_TYPES.map((action) => (
|
{OTHER_TRIGGER_TYPES.map((action) => (
|
||||||
<MenuItem
|
<MenuItemCommand
|
||||||
key={action.defaultLabel}
|
key={action.defaultLabel}
|
||||||
LeftIcon={getIcon(action.icon)}
|
LeftIcon={getIcon(action.icon)}
|
||||||
text={action.defaultLabel}
|
text={action.defaultLabel}
|
||||||
@ -95,6 +80,6 @@ export const RightDrawerWorkflowSelectTriggerTypeContent = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</StyledActionListContainer>
|
</RightDrawerStepListContainer>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user