0.0.43 • Published 3 years ago

@orbisclub/modules v0.0.43

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

@orbisclub/modules

Decentralized social modules created with the Orbis SDK

NPM JavaScript Style Guide

Install

npm install --save @orbisclub/modules

Usage

import { ChatBox } from '@orbisclub/modules'
import "@orbisclub/modules/dist/index.modern.css";

function App() {
  /** The context parameter in the <ChatBox/> object must be your group or channel id or a custom string */
  return(
    <ChatBox context="kjzl6cwe1jw147b42j1yjoxyzrzeg3czq5mjm1lrmg5eeq43yutje3f2s0s2n5h" poweredByOrbis="black" />
  );
}

Styling

By default, the chat box is going to follow a default orange theme but it's possible to customize it to have the chatbox follow your own style, here is how it works:

import { ChatBox } from '@orbisclub/modules'
import "@orbisclub/modules/dist/index.modern.css";

let chat_theme = {
  /** Style for main buttons */
  mainCta: {
    background: 'linear-gradient(135deg, #FF94B4 0%, #AA6AFB 100%)'
  },

  /** Style for the connect button */
  connectBtn: {
    background: 'linear-gradient(135deg, #FF94B4 0%, #AA6AFB 100%)'
  },

  /** Style for the messages sent and received */
  messagesContainer: {
    background: '#DDD'
  },
  messageSent: {
    background: 'linear-gradient(135deg, #FF94B4 0%, #AA6AFB 100%)'
  },
  messageReceived: {
    background: '#fff'
  },

  /** Style for the header and footer (input container) */
  header: {
    background: 'linear-gradient(135deg, #FF94B4 0%, #AA6AFB 100%)',
    color: "#FFF"
  },
  footer: {
    background: "#F2F2F2"
  },

  /** Reply text */
  replyLine: {
    borderColor: "#696969"
  },
  replyText: {
    color: "#696969"
  },

  /** Input style */
  input: {
    background: "#FFF",
    borderWidth: 1,
    borderColor: "#DDD"
  }
};

function App() {
  /** The context parameter in the <ChatBox/> object must be your group or channel id or a custom string */
  return(
    <ChatBox
      context="kjzl6cwe1jw147b42j1yjoxyzrzeg3czq5mjm1lrmg5eeq43yutje3f2s0s2n5h"
      theme={chat_theme}
      title="You can use a custom title"
      poweredByOrbis="white" />
  );
}

License

MIT © OrbisWeb3

0.0.43

3 years ago

0.0.40

3 years ago

0.0.41

3 years ago

0.0.42

3 years ago

0.0.39

3 years ago

0.0.38

4 years ago

0.0.37

4 years ago

0.0.36

4 years ago

0.0.35

4 years ago

0.0.33

4 years ago

0.0.32

4 years ago

0.0.31

4 years ago

0.0.30

4 years ago

0.0.29

4 years ago

0.0.28

4 years ago

0.0.27

4 years ago

0.0.26

4 years ago

0.0.25

4 years ago

0.0.24

4 years ago

0.0.23

4 years ago

0.0.22

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago