0.0.43 • Published 2 years ago

@orbisclub/modules v0.0.43

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

0.0.40

2 years ago

0.0.41

2 years ago

0.0.42

2 years ago

0.0.39

2 years ago

0.0.38

2 years ago

0.0.37

2 years ago

0.0.36

2 years ago

0.0.35

2 years ago

0.0.33

2 years ago

0.0.32

2 years ago

0.0.31

2 years ago

0.0.30

2 years ago

0.0.29

2 years ago

0.0.28

2 years ago

0.0.27

2 years ago

0.0.26

2 years ago

0.0.25

2 years ago

0.0.24

2 years ago

0.0.23

2 years ago

0.0.22

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago