Skip to content

Commit 51bf5b6

Browse files
committed
🐛 (theme) Fix progress bar background color
1 parent 408aeb4 commit 51bf5b6

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

apps/builder/src/features/theme/components/general/ProgressBarForm.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { NumberInput } from '@/components/inputs'
55
import { FormLabel, HStack } from '@chakra-ui/react'
66
import { ProgressBar } from '@typebot.io/schemas'
77
import {
8+
defaultProgressBarBackgroundColor,
89
defaultProgressBarColor,
910
defaultProgressBarIsEnabled,
1011
defaultProgressBarPlacement,
@@ -38,6 +39,9 @@ export const ProgressBarForm = ({
3839
const updateThickness = (thickness?: number) =>
3940
onProgressBarChange({ ...progressBar, thickness })
4041

42+
const updateBackgroundColor = (backgroundColor: string) =>
43+
onProgressBarChange({ ...progressBar, backgroundColor })
44+
4145
return (
4246
<SwitchWithRelatedSettings
4347
label={'Enable progress bar?'}
@@ -53,6 +57,17 @@ export const ProgressBarForm = ({
5357
items={progressBarPlacements}
5458
/>
5559

60+
<HStack justifyContent="space-between">
61+
<FormLabel mb="0" mr="0">
62+
Background color:
63+
</FormLabel>
64+
<ColorPicker
65+
defaultValue={
66+
progressBar?.backgroundColor ?? defaultProgressBarBackgroundColor
67+
}
68+
onColorChange={updateBackgroundColor}
69+
/>
70+
</HStack>
5671
<HStack justifyContent="space-between">
5772
<FormLabel mb="0" mr="0">
5873
Color:

packages/embeds/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typebot.io/js",
3-
"version": "0.2.67",
3+
"version": "0.2.68",
44
"description": "Javascript library to display typebots on your website",
55
"type": "module",
66
"main": "dist/index.js",

packages/embeds/js/src/assets/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ select option {
427427

428428
.typebot-progress-bar-container {
429429
background-color: rgba(
430-
var(--typebot-button-bg-rgb),
430+
var(--typebot-progress-bar-bg-rgb),
431431
calc(var(--selectable-alpha-ratio) * 0.12)
432432
);
433433

packages/embeds/js/src/utils/setCssVariablesValue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const cssVariableNames = {
4949
progressBar: {
5050
position: '--typebot-progress-bar-position',
5151
color: '--typebot-progress-bar-color',
52-
colorRgb: '--typebot-progress-bar-color-rgb',
52+
colorRgb: '--typebot-progress-bar-bg-rgb',
5353
height: '--typebot-progress-bar-height',
5454
top: '--typebot-progress-bar-top',
5555
bottom: '--typebot-progress-bar-bottom',

packages/embeds/nextjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typebot.io/nextjs",
3-
"version": "0.2.67",
3+
"version": "0.2.68",
44
"description": "Convenient library to display typebots on your Next.js website",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

packages/embeds/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typebot.io/react",
3-
"version": "0.2.67",
3+
"version": "0.2.68",
44
"description": "Convenient library to display typebots on your React app",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)