Skip to content

Commit 44bd812

Browse files
committed
update bubble chat
1 parent 73ae1ee commit 44bd812

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ React library to display flowise chatbot on your website
66

77
![Flowise](https://github.com/FlowiseAI/FlowiseChatEmbed/blob/main/images/ChatEmbed.gif?raw=true)
88

9-
## How to Use
10-
11-
In your project, install:
9+
## Install
1210

1311
```bash
1412
npm install flowise-embed flowise-embed-react
@@ -20,7 +18,9 @@ or
2018
yarn add flowise-embed flowise-embed-react
2119
```
2220

23-
Then use it:
21+
## Import
22+
23+
Full Page Chat
2424

2525
```tsx
2626
import { FullPageChat } from "flowise-embed-react";
@@ -30,8 +30,19 @@ const App = () => {
3030
<FullPageChat
3131
chatflowid="your-chatflow-id"
3232
apiHost="http://localhost:3000"
33-
style={{ width: "100%", height: "600px" }}
3433
/>
3534
);
3635
};
3736
```
37+
38+
Popup Chat
39+
40+
```tsx
41+
import { BubbleChat } from "flowise-embed-react";
42+
43+
const App = () => {
44+
return (
45+
<BubbleChat chatflowid="your-chatflow-id" apiHost="http://localhost:3000" />
46+
);
47+
};
48+
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flowise-embed-react",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "React library to display flowise chatbot on your website",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/BubbleChat.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type Props = BubbleProps
66
declare global {
77
namespace JSX {
88
interface IntrinsicElements {
9-
'flowise-bubble': React.DetailedHTMLProps<
9+
'flowise-chatbot': React.DetailedHTMLProps<
1010
React.HTMLAttributes<HTMLElement>,
1111
HTMLElement
1212
>
@@ -32,7 +32,7 @@ export const BubbleChat = (props: Props) => {
3232

3333
const attachBubbleToDom = useCallback((props: Props) => {
3434
const bubbleElement = document.createElement(
35-
'flowise-bubble'
35+
'flowise-chatbot'
3636
) as BubbleElement
3737
ref.current = bubbleElement
3838
injectPropsToElement(ref.current, props)

0 commit comments

Comments
 (0)