🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

mui-react-chat

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

mui-react-chat

## 1. Installation

0.3.10
unpublished
latest
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

ReactJS Chat UI

1. Installation

  • Using npm:
npm install sportstalk-react-chat --save
  • Using yarn:
yarn add sportstalk-react-chat

2. Dependency

This library version using the Sportstalk Chat SDK v3.17

2. Examples

import React from 'react'
import { SportstalkChat, MessageItemActions } from 'sportstalk-react-chat'

export function Example() {

 renderCustomActions = props =>
    <MessageItemActions {...props} onDeleteMessage={...} />


  return (
    <SportstalkChat
      appId={[YOUR_APP_ID]}
      apiToken={[YOUR_API_TOKEN]}
      renderActions={renderCustomActions}
    />
  )
}

3. Props

NameTypeRequiredDescription
appIdstringYesSportstalk app ID
apiTokenstringYesSportstalk app token
refReactRefNoAccess to Sportstalk Client SDK ( see here)
onSendfunctionNoCallback function when user send message
renderLoadingfunctionNoCustom loading view compontnt when initializing app
renderAvatarfunctionNoCustom message avatar
renderMessagefunctionNoCustom text message
renderAdvertisementfunctionNoCustom component for Advertisement messages
renderInputToolbarfunctionNoCustom input bar
renderActionsfunctionNoCustom action on the right of the messages

4. Interfaces

Common message interface

interface IMessage {
  id: string;
  text: string;
  direction: Message.MessageDirection;
  createdAt?: string;
  updatedAt?: string;
  author?: TypedMessageAuthor;
  replyTo?: Partial<IMessage>;
  type?: Message.MessageType;
  reactions: TypedMessageReaction[];
  reports: TypedMessageReport[];
  customPayload?: any;
}

User interface

interface User {
  userid: string;
  handle?: string;
  handlelowercase?: string;
  displayname?: string;
  pictureurl?: string;
  profileurl?: string;
  banned?: boolean;
  shadowbanned?: boolean;
  role?: UserRole;
  customtags?: string[];
  shadowbanexpires?: string | null | undefined;
}

FAQs

Package last updated on 15 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts