import { Flex, Text } from '@chakra-ui/react'
import { Step, StartStep, BubbleStepType, InputStepType } from 'models'
export const StepNodeLabel = (props: Step | StartStep) => {
switch (props.type) {
case BubbleStepType.TEXT: {
return (
Click to edit...
`
: props.content.html,
}}
/>
)
}
case InputStepType.TEXT: {
return (
{props.options?.labels?.placeholder ?? 'Type your answer...'}
)
}
case InputStepType.NUMBER: {
return (
{props.options?.labels?.placeholder ?? 'Type your answer...'}
)
}
case InputStepType.EMAIL: {
return (
{props.options?.labels?.placeholder ?? 'Type your email...'}
)
}
case InputStepType.URL: {
return (
{props.options?.labels?.placeholder ?? 'Type your URL...'}
)
}
case InputStepType.DATE: {
return (
{props.options?.labels?.from ?? 'Pick a date...'}
)
}
case 'start': {
return {props.label}
}
default: {
return No input
}
}
}