2
0

(embed) Add new command setInputValue

This commit is contained in:
Baptiste Arnaud
2023-07-15 17:38:12 +02:00
parent 521cb50782
commit be7be7bf7a
14 changed files with 93 additions and 13 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@typebot.io/react",
"version": "0.1.0",
"version": "0.1.1",
"description": "Convenient library to display typebots on your Next.js website",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -6,6 +6,7 @@ import {
showPreviewMessage,
hidePreviewMessage,
setPrefilledVariables,
setInputValue,
} from '@typebot.io/js'
import { useState } from 'react'
import { leadGenerationTypebot } from './assets/leadGenerationTypebot'
@ -23,6 +24,7 @@ export const Default = () => {
<button onClick={() => showPreviewMessage()}>
Show Preview Message
</button>
<button onClick={() => setInputValue('YOOOO!')}>Set input value</button>
<button onClick={hidePreviewMessage}>Close Preview Message</button>
<div>
<p>Predefined name:</p>