Skip to content

Commit

Permalink
Allow chatbot header slot
Browse files Browse the repository at this point in the history
  • Loading branch information
Bonnak committed Mar 18, 2023
1 parent 5ccbf5f commit 47ad297
Show file tree
Hide file tree
Showing 9 changed files with 1,102 additions and 59 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dist/*.gz
dist/.DS_Store
coverage
docs/.vuepress/dist
demo/*

# dist
# local env files
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@

# Vue Bot UI
# Vue Chat Bot

#### For the one who is finding a customizable chatbot UI.

I build for my private project, but I tried to bring as many options as I think someone need it, so feel free to use it.

*Demo page is coming soon.*

<p align="center">
<img width="300" alt="vue bot UI" src="https://user-images.githubusercontent.com/5735071/71614782-52cc2280-2be0-11ea-8c1b-7af063401d3d.png">
</p>
Expand All @@ -15,22 +13,23 @@ I build for my private project, but I tried to bring as many options as I think
## Install

```bash
npm install vue-bot-ui
npm i vue-chat-bot

// or
yarn add vue-bot-ui

yarn add vue-chat-bot
```

## Usage

Import & register the component

```javascript
import { VueBotUI } from 'vue-bot-ui'
import { VueChatBot } from 'vue-chat-bot'

export default {
components: {
VueBotUI,
VueChatBot,
},
...
}
Expand All @@ -39,7 +38,7 @@ export default {
And use it:

```vue
<VueBotUI
<VueChatBot
:messages="data"
:options="botOptions"
@msg-send="messageSendHandler"
Expand Down Expand Up @@ -193,7 +192,7 @@ You can overwrite the CSS by class name. Each type and state has separate class
## Developers / Build
```bash
# Clone repo
git clone https://github.com/JuzSer/vue-bot-ui
git clone https://github.com/JuzSer/vue-chat-bot

# Install packages
yarn
Expand Down
34 changes: 18 additions & 16 deletions dist/vue-chat-bot.common.js

Large diffs are not rendered by default.

34 changes: 18 additions & 16 deletions dist/vue-chat-bot.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-chat-bot.umd.min.js

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,12 @@
"url": "https://github.com/cuoool/vue-chat-bot.git/issues"
},
"homepage": "https://github.com/cuoool/vue-chat-bot.git#readme",
"license": "MIT"
"license": "MIT",
"volta": {
"node": "16.14.0",
"yarn": "1.22.19"
},
"dependencies": {
"release-please": "^15.9.1"
}
}
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default {
botAvatarImg: BotIcon,
boardContentBg: '#f4f4f4',
msgBubbleBgBot: '#fff',
inputPlaceholder: 'Type hereeee...',
inputPlaceholder: 'Type here...',
inputDisableBg: '#fff',
inputDisablePlaceholder: 'Hit the buttons above to respond'
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/BotUI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
:bot-title="optionsMain.botTitle",
@close-bot="botToggle"
)
template(v-slot:header)
slot(name="header")
BoardContent(
:bot-typing="botTyping",
:main-data="messages"
Expand Down
Loading

0 comments on commit 47ad297

Please sign in to comment.