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

@ -1,6 +1,6 @@
{
"name": "@typebot.io/js",
"version": "0.0.22",
"version": "0.0.23",
"description": "Javascript library to display typebots on your website",
"type": "module",
"main": "dist/index.js",

View File

@ -122,6 +122,10 @@ export const Popup = (props: PopupProps) => {
<div class="flex min-h-full items-center justify-center p-4 text-center sm:p-0">
<div
class="relative h-[80vh] transform overflow-hidden rounded-lg text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg"
style={{
'background-color':
props.theme?.backgroundColor ?? 'transparent',
}}
ref={botContainer}
>
<Bot {...botProps} prefilledVariables={prefilledVariables()} />

View File

@ -2,5 +2,6 @@ export type PopupParams = {
autoShowDelay?: number
theme?: {
width?: string
backgroundColor?: string
}
}