2
0

💄 Add backgroundColor theme field for Popup

And use it for the onboarding modal

Closes #375
This commit is contained in:
Baptiste Arnaud
2023-03-10 10:01:36 +01:00
parent 5bbb5394ba
commit 15c1432c32
5 changed files with 11 additions and 2 deletions

View File

@ -16,6 +16,7 @@ export const OnboardingModal = ({ totalTypebots }: Props) => {
'/bots/onboarding.json',
'/bots/onboarding-dark.json'
)
const backgroundColor = useColorModeValue('white', '#171923')
const { user, updateUser } = useUser()
const [typebot, setTypebot] = useState<Typebot>()
const confettiCanvaContainer = useRef<HTMLCanvasElement | null>(null)
@ -102,6 +103,9 @@ export const OnboardingModal = ({ totalTypebots }: Props) => {
prefilledVariables={{
Name: user?.name?.split(' ')[0] ?? undefined,
}}
theme={{
backgroundColor,
}}
defaultOpen={isNewUser}
onAnswer={handleNewAnswer}
onEnd={handleBotEnd}