rocket-chat-widget

1.0.7 • Public • Published

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

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

Package Sidebar

Install

npm i rocket-chat-widget

Weekly Downloads

2

Version

1.0.7

License

MIT

Unpacked Size

18.2 kB

Total Files

4

Last publish

Collaborators

  • onesebun