Giter Site home page Giter Site logo

karinasigartau0798 / components Goto Github PK

View Code? Open in Web Editor NEW

This project forked from webex/components

0.0 0.0 0.0 150.17 MB

Embed the power of Webex in your web applications, on your own terms ๐Ÿ’ช๐Ÿผ

Home Page: https://webex.github.io/components/storybook

License: MIT License

JavaScript 84.59% SCSS 15.37% HTML 0.04%

components's Introduction

Webex Components

Library of React components to easily embed into your web applications!

CircleCI npm latest version semantic-release license

Webex Components is a set of React components following Webex standard styling, aimed at react developers that want to embed the components into their applications.

Project Status

The Webex Component System is considered to be in beta stage and it's not a generally available product from Webex at this time. This means that the Webex Component System is available for everyone to use but breaking changes may occur as we develop it. We try our best to minimize any breaking changes but they may occur.

While the Webex Component System is not a GA product, we still offer support through all regular channels. However, bug priority is given to products already generally available. We would love for you to use the Webex Component System and be part of the feedback process!

Table of Contents

Demo

We use Storybook to showcase all supported components. Our Storybook can be found at https://webex.github.io/components/storybook.

Install

npx install-peerdeps @webex/components

Webex Components vs Webex Widgets

In addition to the Webex Component System, we also offer the Webex Widgets. The Webex Component System (sometimes shortened as Webex Components) is a set of React components that, while following Webex styling, allow for more granularity in terms of layout and source of data. See usage section.

Webex Widgets are based on Webex Components but include the adapter that uses our Javascript SDK to talk to Webex services for you. This means that the Webex Widgets use the SDK Component Adapter to inject the Webex data. All you need is a valid access token and a few parameters based on the widget you want to use.

You have to take the Widget layout as-is, but the benefit is that there are no configurations needed. Install, copy-paste and you have the power of Webex in your application!

To learn more on the Webex Widgets head to its Github repository at https://github.com/webex/widgets.

Usage

Webex Components Styles

There are two ways to do this:

JavaScript

In your index.js, add the following import:

import '@webex/components/dist/css/webex-components.css';

...
HTML

In the <head> of your index.html, add the following imports:

<head>
  ...
  <link rel="stylesheet" type="text/css" href="node_modules/@webex/components/dist/css/webex-components.css" />
</head>

Adapters

Webex Components are self-updating, meaning, they know how to fetch the data they need. Data is passed to components via adapter classes (see adapters). Adapters are an uniform interface for the Webex Components to consume. They also know how to map the data from their data source to the data the components need.

To use a Webex Component, start by creating a Webex Adapter:

import {WebexJSONAdapter} from '@webex/components';

const adapter = new WebexJSONAdapter(jsonData);

Adapters may interact with different data source types. For instance, as part of the Webex Component repository we distribute a JSON adapter that reads data from JSON files. We also are working on offering an adapter for the Webex browser SDK.

Components

Putting everything together - styles, adapters and components - this is a simple example of how using a component would look like:

import '@webex/components/dist/css/webex-components.css';

import React from 'react';
import ReactDOM from 'react-dom';
import {WebexAvatar, WebexDataProvider, WebexJSONAdapter} from '@webex/components';

// jsonData represents an JSON object with the data to feed components
const adapter = new WebexJSONAdapter(jsonData);

ReactDOM.render(
  <WebexDataProvider adapter={adapter}>
    <WebexAvatar personID="XYZ" />
  </WebexDataProvider>,
  document.getElementById('root')
);

Happy Coding!

Contributing

We'd love for you to contribute to our source code and to make Webex Components even better than it is today! Here are some guidelines that we'd like you to follow.

Issues

Please open an issue and we will get to it in an orderly manner. Please leave as much as information as possible for a better understanding.

License

MIT License

Support

For more developer resources, tutorials and support, visit the Webex developer portal, https://developer.webex.com.

components's People

Contributors

webex-components-publisher avatar lalli-flores avatar akoushke avatar corodaniel avatar karinasigartau0798 avatar patricia0817 avatar adamweeks avatar lungancatalin avatar cernaianumihai avatar alinasuciu avatar interactivetimmy avatar benjamingolya avatar bogdanmaier28 avatar taymoork2 avatar yusenjeng avatar maloun96 avatar dependabot[bot] avatar bgenaro avatar jonniespratley avatar cipak avatar coroiandaniel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.