🐛 Fix bot libs mount behavior and prop types

This commit is contained in:
Baptiste Arnaud
2023-02-20 17:40:51 +01:00
parent 6c2df1a474
commit 46bf25a580
16 changed files with 81 additions and 56 deletions

View File

@@ -9,7 +9,7 @@ type Props = {
context: BotContext
block: FileInputBlock
onSubmit: (url: InputSubmitContent) => void
onSkip: () => void
onSkip: (label: string) => void
}
export const FileUploadForm = (props: Props) => {
@@ -178,7 +178,12 @@ export const FileUploadForm = (props: Props) => {
class={
'py-2 px-4 justify-center font-semibold rounded-md text-white focus:outline-none flex items-center disabled:opacity-50 disabled:cursor-not-allowed disabled:brightness-100 transition-all filter hover:brightness-90 active:brightness-75 typebot-button '
}
on:click={() => props.onSkip()}
on:click={() =>
props.onSkip(
props.block.options.labels.skip ??
defaultFileInputOptions.labels.skip
)
}
>
{props.block.options.labels.skip ??
defaultFileInputOptions.labels.skip}

View File

@@ -124,6 +124,7 @@ export const Bubble = (props: BubbleProps) => {
'transform-origin': 'bottom right',
transform: isBotOpened() ? 'scale3d(1, 1, 1)' : 'scale3d(0, 0, 1)',
'box-shadow': 'rgb(0 0 0 / 16%) 0px 5px 40px',
'background-color': bubbleProps.theme?.chatWindow?.backgroundColor,
}}
class={
'absolute bottom-20 sm:right-4 rounded-lg w-full sm:w-[400px] max-h-[704px] ' +

View File

@@ -4,10 +4,15 @@ export type BubbleParams = {
}
export type BubbleTheme = {
chatWindow?: ChatWindowTheme
button?: ButtonTheme
previewMessage?: PreviewMessageTheme
}
export type ChatWindowTheme = {
backgroundColor?: string
}
export type ButtonTheme = {
backgroundColor?: string
iconColor?: string