1.0.7 • Published 2 years ago

rocket-chat-widget v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

rocket-chat-widget

version npm downloads MIT license

Demo

2022-05-31 20 30 30

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-widget

Getting 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

nametypedefaultdescription
iframeSrcString您的 rocket.chat 網址
iframeTitleStringRocket.chatiframe title 名稱
anchorStringright抽屜方向(top,right,bottom,left)
tooltipStringChattooltip 名稱
closeTextStringClose抽屜關閉名稱
rootStyleObject{ right: 10, bottom: 10, position: 'fixed' }root 樣式
draggableBooleanfalse是否可拖移
drawerWidthNumber500抽屜寬度
iconReactNodeChatIconicon