Skip to content

Commit

Permalink
✏️ Fix react README examples (#542)
Browse files Browse the repository at this point in the history
open, close and toggle are apparently exported from @typebot.io/js
package or at least that's what worked for me, I was getting unknown
function error when trying to import them from @typebot/react

aslo in order for Typebot.showPreviewMessage() and
Typebot.hidePreviewMessage() to work, I need to import all exports as
Typebot, otherwise it didn't seem to have the named exports
"showPreviewMessage" nor "hidePreviewMessage", since I was also getting
an error when trying to import them.

this is my first PR here, I apologise for mistakes upfront.

It's ok if it is not meged, I just wanted to catch your attention on
this potential update required in the documentation of react embed

---------

Co-authored-by: Baptiste Arnaud <[email protected]>
  • Loading branch information
dciccale and baptisteArno authored Jun 5, 2023
1 parent cb4b4c4 commit 61fd44f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/embeds/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ This code will automatically trigger the popup window after 3 seconds.
You can use these commands:

```js
import { open } from '@typebot.io/react'
import { open } from '@typebot.io/js'

open()
```

```js
import { close } from '@typebot.io/react'
import { close } from '@typebot.io/js'

close()
```

```js
import { toggle } from '@typebot.io/react'
import { toggle } from '@typebot.io/js'

toggle()
```
Expand Down Expand Up @@ -85,13 +85,13 @@ This code will show the bubble and let a preview message appear after 5 seconds.
You can use these commands:

```js
import { showPreviewMessage } from '@typebot.io/react'
import { showPreviewMessage } from '@typebot.io/js'

Typebot.showPreviewMessage()
```

```js
import { hidePreviewMessage } from '@typebot.io/react'
import { hidePreviewMessage } from '@typebot.io/js'

Typebot.hidePreviewMessage()
```
Expand All @@ -101,19 +101,19 @@ Typebot.hidePreviewMessage()
You can use these commands:

```js
import { open } from '@typebot.io/react'
import { open } from '@typebot.io/js'

open()
```

```js
import { close } from '@typebot.io/react'
import { close } from '@typebot.io/js'

close()
```

```js
import { toggle } from '@typebot.io/react'
import { toggle } from '@typebot.io/js'

toggle()
```
Expand Down

4 comments on commit 61fd44f

@vercel
Copy link

@vercel vercel bot commented on 61fd44f Jun 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./apps/docs

docs-typebot-io.vercel.app
docs-git-main-typebot-io.vercel.app
docs.typebot.io

@vercel
Copy link

@vercel vercel bot commented on 61fd44f Jun 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 61fd44f Jun 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-git-main-typebot-io.vercel.app
app.typebot.io
builder-v2-typebot-io.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 61fd44f Jun 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

viewer-v2 – ./apps/viewer

bemestar.club
bergamo.store
bot.krdfy.com
bot.tvbeat.it
cgcassets.com
cnvhub.com.br
bot.devitus.com
bot.jesopizz.it
bot.reeplai.com
bot.renovato.it
bot.scayver.com
bot.tc-mail.com
chat.lalmon.com
chat.sureb4.com
eventhub.com.au
fitness.riku.ai
games.klujo.com
proscale.com.br
sakuranembro.it
sellmycarbr.com
typebot.aloe.do
bot.contakit.com
bot.piccinato.co
bot.sv-energy.it
botc.ceox.com.br
clo.closeer.work
cockroach.cr8.ai
faqs.nigerias.io
form.syncwin.com
go.chatbotcv.com
haymanevents.com
kw.wpwakanda.com
myrentalhost.com
stan.vselise.com
start.taxtree.io
typebot.aloe.bot
voicehelp.cr8.ai
zap.fundviser.in
app.bouclidom.com
app.chatforms.net
bot.aldoemaria.it
bot.chatbotcv.com
bot.hostnation.de
bot.maitempah.com
bot.phuonghub.com
bot.reviewzer.com
bot.rihabilita.it
bot.uluhub.com.br
cares.urlabout.me
chat.gaswadern.de
chat.gniorder.com
chat.rojie.online
fmm.wpwakanda.com
footballmeetup.ie
gentleman-shop.fr
register.algorithmpress.com
sell.sellthemotorhome.co.uk
anamnese.odontopavani.com.br
austin.channelautomation.com
bot.marketingplusmindset.com
bot.seidibergamoseanchetu.it
desabafe.sergiolimajr.com.br
download.venturemarketing.in
open.campus.aalen.university
piazzatorre.barrettamario.it
poll.mosaicohairboutique.com
type.cookieacademyonline.com
upload.atlasoutfittersk9.com
bot.brigadeirosemdrama.com.br
tuttirecepcao.fratucci.com.br
forms.escoladeautomacao.com.br
onboarding.libertydreamcare.ie
recepcao.tutti.fratucci.com.br
type.talitasouzamarques.com.br
agendamento.sergiolimajr.com.br
anamnese.clinicamegasjdr.com.br
bookings.littlepartymonkeys.com
bot.comercializadoraomicron.com
elevateyourmind.groovepages.com
viewer-v2-typebot-io.vercel.app
yourfeedback.comebackreward.com
baleia.testeeventos.progenbr.com
bot.cabin-rentals-of-georgia.net
open.campus.bot.aalen.university
sondaggio.mosaicohairboutique.it
baleia.testegabinete.progenbr.com
gerador.verificadordehospedes.com
personal-trainer.barrettamario.it
sondaggio.mosaicohairboutique.com
preagendamento.sergiolimajr.com.br
studiotecnicoimmobiliaremerelli.it
download.thailandmicespecialist.com
register.thailandmicespecialist.com
bot.studiotecnicoimmobiliaremerelli.it
pesquisa.escolamodacomproposito.com.br
anamnese.clinicaramosodontologia.com.br
gabinete.baleia.formulario.progenbr.com
chrome-os-inquiry-system.itschromeos.com
viewer-v2-git-main-typebot-io.vercel.app
main-menu-for-itschromeos.itschromeos.com

Please sign in to comment.