🐛 (theme) Fix progress bar background color
This commit is contained in:
@ -5,6 +5,7 @@ import { NumberInput } from '@/components/inputs'
|
|||||||
import { FormLabel, HStack } from '@chakra-ui/react'
|
import { FormLabel, HStack } from '@chakra-ui/react'
|
||||||
import { ProgressBar } from '@typebot.io/schemas'
|
import { ProgressBar } from '@typebot.io/schemas'
|
||||||
import {
|
import {
|
||||||
|
defaultProgressBarBackgroundColor,
|
||||||
defaultProgressBarColor,
|
defaultProgressBarColor,
|
||||||
defaultProgressBarIsEnabled,
|
defaultProgressBarIsEnabled,
|
||||||
defaultProgressBarPlacement,
|
defaultProgressBarPlacement,
|
||||||
@ -38,6 +39,9 @@ export const ProgressBarForm = ({
|
|||||||
const updateThickness = (thickness?: number) =>
|
const updateThickness = (thickness?: number) =>
|
||||||
onProgressBarChange({ ...progressBar, thickness })
|
onProgressBarChange({ ...progressBar, thickness })
|
||||||
|
|
||||||
|
const updateBackgroundColor = (backgroundColor: string) =>
|
||||||
|
onProgressBarChange({ ...progressBar, backgroundColor })
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SwitchWithRelatedSettings
|
<SwitchWithRelatedSettings
|
||||||
label={'Enable progress bar?'}
|
label={'Enable progress bar?'}
|
||||||
@ -53,6 +57,17 @@ export const ProgressBarForm = ({
|
|||||||
items={progressBarPlacements}
|
items={progressBarPlacements}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<HStack justifyContent="space-between">
|
||||||
|
<FormLabel mb="0" mr="0">
|
||||||
|
Background color:
|
||||||
|
</FormLabel>
|
||||||
|
<ColorPicker
|
||||||
|
defaultValue={
|
||||||
|
progressBar?.backgroundColor ?? defaultProgressBarBackgroundColor
|
||||||
|
}
|
||||||
|
onColorChange={updateBackgroundColor}
|
||||||
|
/>
|
||||||
|
</HStack>
|
||||||
<HStack justifyContent="space-between">
|
<HStack justifyContent="space-between">
|
||||||
<FormLabel mb="0" mr="0">
|
<FormLabel mb="0" mr="0">
|
||||||
Color:
|
Color:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/js",
|
"name": "@typebot.io/js",
|
||||||
"version": "0.2.67",
|
"version": "0.2.68",
|
||||||
"description": "Javascript library to display typebots on your website",
|
"description": "Javascript library to display typebots on your website",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -427,7 +427,7 @@ select option {
|
|||||||
|
|
||||||
.typebot-progress-bar-container {
|
.typebot-progress-bar-container {
|
||||||
background-color: rgba(
|
background-color: rgba(
|
||||||
var(--typebot-button-bg-rgb),
|
var(--typebot-progress-bar-bg-rgb),
|
||||||
calc(var(--selectable-alpha-ratio) * 0.12)
|
calc(var(--selectable-alpha-ratio) * 0.12)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ const cssVariableNames = {
|
|||||||
progressBar: {
|
progressBar: {
|
||||||
position: '--typebot-progress-bar-position',
|
position: '--typebot-progress-bar-position',
|
||||||
color: '--typebot-progress-bar-color',
|
color: '--typebot-progress-bar-color',
|
||||||
colorRgb: '--typebot-progress-bar-color-rgb',
|
colorRgb: '--typebot-progress-bar-bg-rgb',
|
||||||
height: '--typebot-progress-bar-height',
|
height: '--typebot-progress-bar-height',
|
||||||
top: '--typebot-progress-bar-top',
|
top: '--typebot-progress-bar-top',
|
||||||
bottom: '--typebot-progress-bar-bottom',
|
bottom: '--typebot-progress-bar-bottom',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/nextjs",
|
"name": "@typebot.io/nextjs",
|
||||||
"version": "0.2.67",
|
"version": "0.2.68",
|
||||||
"description": "Convenient library to display typebots on your Next.js website",
|
"description": "Convenient library to display typebots on your Next.js website",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/react",
|
"name": "@typebot.io/react",
|
||||||
"version": "0.2.67",
|
"version": "0.2.68",
|
||||||
"description": "Convenient library to display typebots on your React app",
|
"description": "Convenient library to display typebots on your React app",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
Reference in New Issue
Block a user