2
0

♻️ (models) Change to features-centric folder structure

This commit is contained in:
Baptiste Arnaud
2022-11-15 11:02:26 +01:00
committed by Baptiste Arnaud
parent a9d04798bc
commit a5c8a8a95c
55 changed files with 37 additions and 43 deletions

View File

@ -0,0 +1,18 @@
import { z } from 'zod'
import { blockBaseSchema, BubbleBlockType } from '../shared'
export const imageBubbleContentSchema = z.object({
url: z.string().optional(),
})
export const imageBubbleBlockSchema = blockBaseSchema.and(
z.object({
type: z.enum([BubbleBlockType.IMAGE]),
content: imageBubbleContentSchema,
})
)
export const defaultImageBubbleContent: ImageBubbleContent = {}
export type ImageBubbleBlock = z.infer<typeof imageBubbleBlockSchema>
export type ImageBubbleContent = z.infer<typeof imageBubbleContentSchema>