feat(steps): ✨ Add Embed bubble
This commit is contained in:
@ -1,17 +1,23 @@
|
||||
import { StepBase } from '.'
|
||||
|
||||
export type BubbleStep = TextBubbleStep | ImageBubbleStep | VideoBubbleStep
|
||||
export type BubbleStep =
|
||||
| TextBubbleStep
|
||||
| ImageBubbleStep
|
||||
| VideoBubbleStep
|
||||
| EmbedBubbleStep
|
||||
|
||||
export enum BubbleStepType {
|
||||
TEXT = 'text',
|
||||
IMAGE = 'image',
|
||||
VIDEO = 'video',
|
||||
EMBED = 'embed',
|
||||
}
|
||||
|
||||
export type BubbleStepContent =
|
||||
| TextBubbleContent
|
||||
| ImageBubbleContent
|
||||
| VideoBubbleContent
|
||||
| EmbedBubbleContent
|
||||
|
||||
export type TextBubbleStep = StepBase & {
|
||||
type: BubbleStepType.TEXT
|
||||
@ -28,6 +34,11 @@ export type VideoBubbleStep = StepBase & {
|
||||
content: VideoBubbleContent
|
||||
}
|
||||
|
||||
export type EmbedBubbleStep = StepBase & {
|
||||
type: BubbleStepType.EMBED
|
||||
content: EmbedBubbleContent
|
||||
}
|
||||
|
||||
export type TextBubbleContent = {
|
||||
html: string
|
||||
richText: unknown[]
|
||||
@ -38,6 +49,11 @@ export type ImageBubbleContent = {
|
||||
url?: string
|
||||
}
|
||||
|
||||
export type EmbedBubbleContent = {
|
||||
url?: string
|
||||
height: number
|
||||
}
|
||||
|
||||
export enum VideoBubbleContentType {
|
||||
URL = 'url',
|
||||
YOUTUBE = 'youtube',
|
||||
@ -59,3 +75,5 @@ export const defaultTextBubbleContent: TextBubbleContent = {
|
||||
export const defaultImageBubbleContent: ImageBubbleContent = {}
|
||||
|
||||
export const defaultVideoBubbleContent: VideoBubbleContent = {}
|
||||
|
||||
export const defaultEmbedBubbleContent: EmbedBubbleContent = { height: 400 }
|
||||
|
Reference in New Issue
Block a user