rocket-chat-widget
v1.0.7
Published
rocket-chat-widget React component
Maintainers
Readme
rocket-chat-widget
Demo

rocket.chat iframe integration
https://developer.rocket.chat/rocket.chat/iframe-integration/adding-a-rocket.chat-chat-room-to-your-web-app
Installation
npm install rocket-chat-widget
// or
yarn add rocket-chat-widgetGetting started
import * as React from 'react';
import ReactDOM from 'react-dom';
import RocketChatWidget from 'rocket-chat-widget'
function App() {
return (
<RocketChatWidget
iframeSrc='http://localhost/channel/general'
anchor='right'
closeText='關閉'
/>
);
}Props
| name | type | default | description | |-------------|-----------|-------------------------------------------------|--------------------------------| | iframeSrc | String | | 您的 rocket.chat 網址 | | iframeTitle | String | Rocket.chat | iframe title 名稱 | | anchor | String | right | 抽屜方向(top,right,bottom,left)| | tooltip | String | Chat | tooltip 名稱 | | closeText | String | Close | 抽屜關閉名稱 | | rootStyle | Object | { right: 10, bottom: 10, position: 'fixed' } | root 樣式 | | draggable | Boolean | false | 是否可拖移 | | drawerWidth | Number | 500 | 抽屜寬度 | | icon | ReactNode | ChatIcon | icon |
