(theme) Add theme templates

Allows you to save your themes and select a theme from Typebot's gallery

Closes #275
This commit is contained in:
Baptiste Arnaud
2023-03-28 15:10:06 +02:00
parent c1cf817127
commit 38ed5758fe
49 changed files with 2066 additions and 116 deletions

View File

@@ -1,9 +1,6 @@
import {
LogicBlockType,
PublicTypebot,
ResultsTablePreferences,
Settings,
Theme,
Typebot,
Webhook,
} from '@typebot.io/schemas'
@@ -45,16 +42,20 @@ import { convertPublicTypebotToTypebot } from '@/features/publish/helpers/conver
const autoSaveTimeout = 10000
type UpdateTypebotPayload = Partial<{
theme: Theme
settings: Settings
publicId: string
name: string
icon: string
customDomain: string | null
resultsTablePreferences: ResultsTablePreferences
isClosed: boolean
}>
type UpdateTypebotPayload = Partial<
Pick<
Typebot,
| 'theme'
| 'selectedThemeTemplateId'
| 'settings'
| 'publicId'
| 'name'
| 'icon'
| 'customDomain'
| 'resultsTablePreferences'
| 'isClosed'
>
>
export type SetTypebot = (
newPresent: Typebot | ((current: Typebot) => Typebot)