feat(theme): ✨ Add chat theme settings
This commit is contained in:
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 = {
|
||||
|
Reference in New Issue
Block a user