2
0

feat(editor): Add Zapier step

This commit is contained in:
Baptiste Arnaud
2022-02-22 08:03:38 +01:00
parent d0994e6577
commit 642a42779b
15 changed files with 117 additions and 13 deletions

View File

@ -21,6 +21,7 @@ import { ConfigureContent } from './contents/ConfigureContent'
import { ImageBubbleContent } from './contents/ImageBubbleContent'
import { PlaceholderContent } from './contents/PlaceholderContent'
import { SendEmailContent } from './contents/SendEmailContent'
import { ZapierContent } from './contents/ZapierContent'
type Props = {
step: Step | StartStep
@ -102,6 +103,9 @@ export const StepNodeContent = ({ step, indices }: Props) => {
case IntegrationStepType.WEBHOOK: {
return <WebhookContent step={step} />
}
case IntegrationStepType.ZAPIER: {
return <ZapierContent step={step} />
}
case IntegrationStepType.EMAIL: {
return <SendEmailContent step={step} />
}

View File

@ -0,0 +1,17 @@
import { Text } from '@chakra-ui/react'
import { ZapierStep } from 'models'
import { isNotDefined } from 'utils'
type Props = {
step: ZapierStep
}
export const ZapierContent = ({ step }: Props) => {
if (isNotDefined(step.webhook.body))
return <Text color="gray.500">Configure...</Text>
return (
<Text isTruncated pr="6">
{step.webhook.url ? 'Enabled' : 'Disabled'}
</Text>
)
}