@chakadev/react
TypeScript icon, indicating that this package has built-in type declarations

0.1.13 • Public • Published

Chaka React SDK

Enterprise integration components provided chaka.ng NPM JavaScript Style Guide

Install

npm install --save @chakadev/react
or
yarn add @chakadev/react

Usage

import React from 'react';
import from './logo.svg';
import { ChakaApp } from '@chakadev/react';
import '@chakadev/react/dist/base.css';

function App() {

const bearerToken = `eh2TGXAkAO9U7c_740Z40NmjUuHrb4bfB5peHVKZF1H`;
const logo = 'http://mydomain.com/our-logo.png';
const closeModal = () => console.log('modal closed');
const showModal = true; 

  return (
    <div className="App">
      <ChakaApp 
        elementID={'#root'} 
        logoUrl={logo} 
        show={showModal} 
        token={bearerToken} 
        closeModal={closeModal}
      />
    </div>
  );
}
export default App;

Component Props

Field Type Description
token string Bearer access token gotten from the backend
elementID string id attached to an HTML node. i.e "#root"
show boolean controls the triggering of the modal
logoUrl string brand logo url for modal branding
closeModal function call back function called after the modal is closed"

Contribution

How to setup the SDK; at the root of the project install dependencies by

yarn install

to compile the library as you are building at the project root folder run

npm start

see the project and include the library components, open another terminal and navigate to the docs folder and run

npm start

License

MIT © chakadev

Readme

Keywords

none

Package Sidebar

Install

npm i @chakadev/react

Weekly Downloads

1

Version

0.1.13

License

MIT

Unpacked Size

2.27 MB

Total Files

135

Last publish

Collaborators

  • chakatechnologies