0.1.23 • Published 2 years ago
kharlamov-meet-chat v0.1.23
meet-chat
Project setup
yarn install
Compiles and hot-reloads for development
yarn serve
Compiles and minifies for production
yarn build
Compiles and minifies for production - as a library
yarn build:lib
Run your unit tests
yarn test:unit
Lints and fixes files
yarn lint
Installation
# Using npm
npm install --save meet-chat
# Using yarn
yarn add meet-chat
Usage
You can import it as a custom component:
<template>
<chat-container
:is-open="isChatOpen"
:room-id="chatRoomId"
:user-id="userId"
:username="username"
:locale="currentLocale"
@hide-chat="closeChatbox"
@new-chat-message="updateNewChatMessages"
/>
</template>
<script>
import ChatContainer from 'meet-chat'
import 'meet-chat/dist/meet-chat.css'
export default {
components: {
ChatContainer
},
data() {
return {
isChatOpen: false,
userId: "123",
username: "Test user",
chatRoomId: "hostname_roomId",
currentLocale: "en",
numberOfNewMessages: 0,
}
},
},
methods: {
closeChatbox() {
this.isChatOpen = false;
},
updateNewChatMessages(numberOfNewMessages) {
this.numberOfNewMessages = numberOfNewMessages
}
}
</script>
Props API
Prop | Type | Required | Default |
---|---|---|---|
is-open | Boolean | - | false |
user-id | String | true | - |
username | String | true | - |
room-id | String | true | - |
locale | String | true | - |
locale-texts | Object | - | {} |
custom-styles | Object | - | {} |
Events API
Event | Params | Fires when |
---|---|---|
hide-chat | - | an user hides chat |
new-chat-message | Number | the number of new messages changes |
0.1.23
2 years ago
0.1.22
2 years ago
0.1.21
2 years ago
0.1.20
2 years ago
0.1.19
2 years ago
0.1.18
2 years ago
0.1.17
2 years ago
0.1.16
2 years ago
0.1.15
2 years ago
0.1.14
2 years ago
0.1.13
2 years ago
0.1.12
2 years ago
0.1.11
2 years ago
0.1.10
2 years ago
0.1.9
2 years ago
0.1.8
2 years ago
0.1.7
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago