feat(bubbles): ✨ Add video bubble
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user