2
0

feat(bubbles): Add image bubble

This commit is contained in:
Baptiste Arnaud
2022-01-20 16:14:47 +01:00
parent c43fd1d386
commit 2d178978ef
33 changed files with 848 additions and 142 deletions

View File

@ -1,12 +1,28 @@
import { StepBase } from '.'
export type BubbleStep = TextStep
export type BubbleStep = TextBubbleStep | ImageBubbleStep
export enum BubbleStepType {
TEXT = 'text',
IMAGE = 'image',
}
export type TextStep = StepBase & {
export type TextBubbleStep = StepBase & {
type: BubbleStepType.TEXT
content: { html: string; richText: unknown[]; plainText: string }
content: TextBubbleContent
}
export type ImageBubbleStep = StepBase & {
type: BubbleStepType.IMAGE
content?: ImageBubbleContent
}
export type TextBubbleContent = {
html: string
richText: unknown[]
plainText: string
}
export type ImageBubbleContent = {
url?: string
}