forked from twentyhq/twenty
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow email action (twentyhq#7279)
- Add the SAVE_EMAIL action. This action requires more setting parameters than the Serverless Function action. - Changed the way we computed the workflow diagram. It now preserves some properties, like the `selected` property. That's necessary to not close the right drawer when the workflow back-end data change. - Added the possibility to set a label to a TextArea. This uses a `<label>` HTML element and the `useId()` hook to create an id linking the label with the input.
- Loading branch information
1 parent
ef09475
commit 3eba8ea
Showing
19 changed files
with
512 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
packages/twenty-front/src/modules/workflow/components/WorkflowEditActionFormBase.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import styled from '@emotion/styled'; | ||
import React from 'react'; | ||
|
||
const StyledTriggerHeader = styled.div` | ||
background-color: ${({ theme }) => theme.background.secondary}; | ||
border-bottom: 1px solid ${({ theme }) => theme.border.color.medium}; | ||
display: flex; | ||
flex-direction: column; | ||
padding: ${({ theme }) => theme.spacing(6)}; | ||
`; | ||
|
||
const StyledTriggerHeaderTitle = styled.p` | ||
color: ${({ theme }) => theme.font.color.primary}; | ||
font-weight: ${({ theme }) => theme.font.weight.semiBold}; | ||
font-size: ${({ theme }) => theme.font.size.xl}; | ||
margin: ${({ theme }) => theme.spacing(3)} 0; | ||
`; | ||
|
||
const StyledTriggerHeaderType = styled.p` | ||
color: ${({ theme }) => theme.font.color.tertiary}; | ||
margin: 0; | ||
`; | ||
|
||
const StyledTriggerHeaderIconContainer = styled.div` | ||
align-self: flex-start; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: ${({ theme }) => theme.background.transparent.light}; | ||
border-radius: ${({ theme }) => theme.border.radius.xs}; | ||
padding: ${({ theme }) => theme.spacing(1)}; | ||
`; | ||
|
||
export const WorkflowEditActionFormBase = ({ | ||
ActionIcon, | ||
actionTitle, | ||
actionType, | ||
children, | ||
}: { | ||
ActionIcon: React.ReactNode; | ||
actionTitle: string; | ||
actionType: string; | ||
children: React.ReactNode; | ||
}) => { | ||
return ( | ||
<> | ||
<StyledTriggerHeader> | ||
<StyledTriggerHeaderIconContainer> | ||
{ActionIcon} | ||
</StyledTriggerHeaderIconContainer> | ||
|
||
<StyledTriggerHeaderTitle>{actionTitle}</StyledTriggerHeaderTitle> | ||
|
||
<StyledTriggerHeaderType>{actionType}</StyledTriggerHeaderType> | ||
</StyledTriggerHeader> | ||
|
||
{children} | ||
</> | ||
); | ||
}; |
Oops, something went wrong.