2
0

feat(engine): Add Rating input

This commit is contained in:
Baptiste Arnaud
2022-06-07 19:09:08 +02:00
parent 301097623b
commit b1aecf843b
19 changed files with 455 additions and 28 deletions

View File

@ -18,6 +18,7 @@ import {
NumberIcon,
PhoneIcon,
SendEmailIcon,
StarIcon,
TextIcon,
WebhookIcon,
} from 'assets/icons'
@ -65,6 +66,8 @@ export const StepIcon = ({ type, ...props }: StepIconProps) => {
return <CheckSquareIcon color="orange.500" {...props} />
case InputStepType.PAYMENT:
return <CreditCardIcon color="orange.500" {...props} />
case InputStepType.RATING:
return <StarIcon color="orange.500" {...props} />
case LogicStepType.SET_VARIABLE:
return <EditIcon color="purple.500" {...props} />
case LogicStepType.CONDITION:
@ -91,7 +94,5 @@ export const StepIcon = ({ type, ...props }: StepIconProps) => {
return <SendEmailIcon {...props} />
case 'start':
return <FlagIcon {...props} />
default:
return <></>
}
}

View File

@ -10,8 +10,10 @@ import React from 'react'
type Props = { type: StepType }
export const StepTypeLabel = ({ type }: Props) => {
export const StepTypeLabel = ({ type }: Props): JSX.Element => {
switch (type) {
case 'start':
return <Text>Start</Text>
case BubbleStepType.TEXT:
case InputStepType.TEXT:
return <Text>Text</Text>
@ -39,6 +41,8 @@ export const StepTypeLabel = ({ type }: Props) => {
return <Text>Button</Text>
case InputStepType.PAYMENT:
return <Text>Payment</Text>
case InputStepType.RATING:
return <Text>Rating</Text>
case LogicStepType.SET_VARIABLE:
return <Text>Set variable</Text>
case LogicStepType.CONDITION:
@ -79,7 +83,5 @@ export const StepTypeLabel = ({ type }: Props) => {
return <Text>Pabbly</Text>
case IntegrationStepType.EMAIL:
return <Text>Email</Text>
default:
return <></>
}
}