(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

@@ -37,14 +37,14 @@ export const ButtonThemeSettings = ({ buttonTheme, onChange }: Props) => {
<HStack justify="space-between">
<Text>Background color</Text>
<ColorPicker
initialColor={buttonTheme?.backgroundColor}
defaultValue={buttonTheme?.backgroundColor}
onColorChange={updateBackgroundColor}
/>
</HStack>
<HStack justify="space-between">
<Text>Icon color</Text>
<ColorPicker
initialColor={buttonTheme?.iconColor}
defaultValue={buttonTheme?.iconColor}
onColorChange={updateIconColor}
/>
</HStack>

View File

@@ -49,28 +49,28 @@ export const PreviewMessageThemeSettings = ({
<HStack justify="space-between">
<Text>Background color</Text>
<ColorPicker
initialColor={previewMessageTheme?.backgroundColor}
defaultValue={previewMessageTheme?.backgroundColor}
onColorChange={updateBackgroundColor}
/>
</HStack>
<HStack justify="space-between">
<Text>Text color</Text>
<ColorPicker
initialColor={previewMessageTheme?.textColor}
defaultValue={previewMessageTheme?.textColor}
onColorChange={updateTextColor}
/>
</HStack>
<HStack justify="space-between">
<Text>Close button background</Text>
<ColorPicker
initialColor={previewMessageTheme?.closeButtonBackgroundColor}
defaultValue={previewMessageTheme?.closeButtonBackgroundColor}
onColorChange={updateCloseButtonBackgroundColor}
/>
</HStack>
<HStack justify="space-between">
<Text>Close icon color</Text>
<ColorPicker
initialColor={previewMessageTheme?.closeButtonIconColor}
defaultValue={previewMessageTheme?.closeButtonIconColor}
onColorChange={updateCloseButtonIconColor}
/>
</HStack>