2
0

🧑‍💻 Fix type resolution for @typebot.io/react and nextjs

Closes #968
This commit is contained in:
Baptiste Arnaud
2023-10-26 15:57:55 +02:00
parent 3f7f0944e1
commit 31b3fc311e
9 changed files with 93 additions and 25 deletions

View File

@@ -1,16 +1,29 @@
import type {
BotProps,
PopupProps,
BubbleProps,
} from '@typebot.io/js/dist/index'
import dynamic from 'next/dynamic'
export const Standard = dynamic(
() => import('@typebot.io/react/src/Standard'),
{ ssr: false }
export const Standard: React.ComponentType<
BotProps & {
style?: React.CSSProperties
className?: string
}
> = dynamic(() => import('@typebot.io/react/src/Standard'), { ssr: false })
export const Popup: React.ComponentType<PopupProps> = dynamic(
() => import('@typebot.io/react/src/Popup'),
{
ssr: false,
}
)
export const Popup = dynamic(() => import('@typebot.io/react/src/Popup'), {
ssr: false,
})
export const Bubble = dynamic(() => import('@typebot.io/react/src/Bubble'), {
ssr: false,
})
export const Bubble: React.ComponentType<BubbleProps> = dynamic(
() => import('@typebot.io/react/src/Bubble'),
{
ssr: false,
}
)
export * from '@typebot.io/js'