2
0

feat(inputs): Add email input

This commit is contained in:
Baptiste Arnaud
2022-01-08 08:20:54 +01:00
parent d54ebc0cbe
commit 47162cb28a
13 changed files with 282 additions and 77 deletions

View File

@ -2,7 +2,7 @@ export type Step = StartStep | BubbleStep | InputStep
export type BubbleStep = TextStep
export type InputStep = TextInputStep | NumberInputStep
export type InputStep = TextInputStep | NumberInputStep | EmailInputStep
export type StepType = 'start' | BubbleStepType | InputStepType
@ -13,6 +13,7 @@ export enum BubbleStepType {
export enum InputStepType {
TEXT = 'text input',
NUMBER = 'number input',
EMAIL = 'email input',
}
export type StepBase = { id: string; blockId: string; target?: Target }
@ -37,6 +38,13 @@ export type NumberInputStep = StepBase & {
options?: NumberInputOptions
}
export type EmailInputStep = StepBase & {
type: InputStepType.EMAIL
options?: EmailInputOptions
}
export type EmailInputOptions = InputOptionsBase
type InputOptionsBase = {
labels?: { placeholder?: string; button?: string }
}