0.1.7 • Published 5 years ago

river-service v0.1.7

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

⭐️ Features

  • RTL Support
  • Jest unit testing
  • Daily dependabot dependency updates

📦 Installation

npm install river-service

💎 Usage

const opts = {
    rtl: false,
};
const userInfo = {
    firstname: 'FIRST_NAME',
    lastname: 'LAST_NAME',
    workspace: 'cyrus.river.im',
    phone: '23740077'
};

let riverService = window.RiverService.default;
let srv = new riverService(opts);
srv.onload = () => {
    srv.setUserInfo(userInfo).then((res) => {
        console.log(res);
    });
}

Options

PropertyDefaultType
urlhttps://web.river.imstring
rtlfalseboolean
el(appends new element)HTMLElement

User info object

PropertyDefaultType
firstname''string
lastname''string
workspace'cyrus.river.im'string
phone0number

✍️ Methods

  • setUserInfo(userInfo)
  • toggleVisible(boolean) toggles visibility of badge
  • setRTL(boolean)

✅ Websites built with this lib

  • Nested - Nested - Team Commiunication Platform
0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago