0.1.5 • Published 2 years ago

@belivvr/hubs-channel-ui v0.1.5

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

Hubs Channel UI

Belivvr logo

React TypeScript

codecov


Introduce

This library add channel UI in mozilla/hubs

Install

npm i @belivvr/hubs-channel-ui --legacy-peer-deps
  • Find package-lock.json in @belivvr/hubs-channel-ui part and copy
  • Revert package-lock.json and paste @belivvr/hubs-channel-ui part

Usage

Add hub.js in under code.

import { Sidebar } from "./sidebar/Sidebar";
import { CloseButton } from "./input/CloseButton";

import {
  ChannelContainer,
  ChannelsButton,
  LightThemeIcon,
  DarkThemeIcon,
} from "@belivvr/hubs-channel-ui";

ChannelContainer

Find hub.js in this.state.sidebarId ? ( and paste under this

function handleClickPrivateChannelButton(channel) {
  // if you want to use private channel...
}

// ...

{this.state.sidebarId === "channels" && (
  <ChannelContainer
    Sidebar={Sidebar}
    CloseButton={CloseButton}
    data={data}
    usePrivateChannel={usePrivateChannel}
    error={isPrivateChannelError}
    onClose={() => this.setSidebar(null)}
    onClickPrivateChannelButton={handleClickPrivateChannelButton}
  />
)}

ChannelsButton

Find hub.js in toolbarCenter={ and paste under this

{entered && (
  <ChannelsButton
    ToolbarButton={ToolbarButton}
    onClick={() => this.toggleSidebar("channels")}
    LightThemeIcon={<img src={LightThemeIcon} alt="" />}
    DarkThemeIcon={<img src={DarkThemeIcon} alt="" />}
  />
)}
0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

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.6

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago