2
0

feat(bubbles): Add video bubble

This commit is contained in:
Baptiste Arnaud
2022-01-20 17:45:25 +01:00
parent 2d178978ef
commit df2474ef43
14 changed files with 432 additions and 40 deletions

View File

@ -1,12 +1,18 @@
import { StepBase } from '.'
export type BubbleStep = TextBubbleStep | ImageBubbleStep
export type BubbleStep = TextBubbleStep | ImageBubbleStep | VideoBubbleStep
export enum BubbleStepType {
TEXT = 'text',
IMAGE = 'image',
VIDEO = 'video',
}
export type BubbleStepContent =
| TextBubbleContent
| ImageBubbleContent
| VideoBubbleContent
export type TextBubbleStep = StepBase & {
type: BubbleStepType.TEXT
content: TextBubbleContent
@ -17,6 +23,11 @@ export type ImageBubbleStep = StepBase & {
content?: ImageBubbleContent
}
export type VideoBubbleStep = StepBase & {
type: BubbleStepType.VIDEO
content?: VideoBubbleContent
}
export type TextBubbleContent = {
html: string
richText: unknown[]
@ -26,3 +37,15 @@ export type TextBubbleContent = {
export type ImageBubbleContent = {
url?: string
}
export enum VideoBubbleContentType {
URL = 'url',
YOUTUBE = 'youtube',
VIMEO = 'vimeo',
}
export type VideoBubbleContent = {
type?: VideoBubbleContentType
url?: string
id?: string
}