2
0

feat(theme): Add chat theme settings

This commit is contained in:
Baptiste Arnaud
2022-01-24 15:07:09 +01:00
parent 619d10ae4e
commit b0abe5b8fa
37 changed files with 771 additions and 375 deletions

View File

@ -18,6 +18,6 @@ export type PublicTypebot = Omit<
choiceItems: Table<ChoiceItem>
variables: Table<Variable>
edges: Table<Edge>
theme: Theme
settings: Settings
theme?: Theme
settings?: Settings
}

View File

@ -1,9 +1,9 @@
export type Settings = {
typingEmulation: TypingEmulationSettings
typingEmulation?: TypingEmulationSettings
}
export type TypingEmulationSettings = {
enabled: boolean
speed: number
maxDelay: number
enabled?: boolean
speed?: number
maxDelay?: number
}

View File

@ -1,8 +1,27 @@
export type Theme = {
general: {
font: string
background: Background
}
general?: GeneralTheme
chat?: ChatTheme
}
export type GeneralTheme = {
font?: string
background?: Background
}
export type ChatTheme = {
hostBubbles?: ContainerColors
guestBubbles?: ContainerColors
buttons?: ContainerColors
inputs?: InputColors
}
export type ContainerColors = {
backgroundColor?: string
color?: string
}
export type InputColors = ContainerColors & {
placeholderColor?: string
}
export enum BackgroundType {
@ -13,5 +32,5 @@ export enum BackgroundType {
export type Background = {
type: BackgroundType
content: string
content?: string
}

View File

@ -23,8 +23,8 @@ export type Typebot = Omit<
variables: Table<Variable>
edges: Table<Edge>
webhooks: Table<Webhook>
theme: Theme
settings: Settings
theme?: Theme
settings?: Settings
}
export type Block = {