Giter VIP home page Giter VIP logo

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.

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

npm install --save @webex/components rxjs

Usage

Styles

In order to properly style Webex Components, we need to import all the fonts, icons, images and core CSS manually. Import @webex/components/dist/webexComponents.css into your main entry file.

There are two ways to do this:

JavaScript

In your index.js, add the following import:

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

HTML

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

<head>
  ...
  <link rel="stylesheet" type="text/css" href="node_modules/@webex/components/dist/webexComponents.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/webexComponents.css';

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

const adapter = new WebexJSONAdapter(jsonData); // jsonData represents an opened file

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.

Contributing Code

We are using Webex Style Guide eslint rule and prettier to lint the code style. You can "prettify" your code before committing via:

npm run prettier:write

Release Process

There is a list of commit types provided here. However, not all commits trigger our release process. We are using semantic-release to fully automate the version management and package publishing. By default semantic-release uses the Angular Commit Message Conventions and triggers release and publishing based on the following rules:

Commit Release type
Commit with type BREAKING CHANGE Major release
Commit with type feat Minor release
Commit with type fix Patch release
Commit with type perf Patch release

Commit linter

We are using commitlint to lintify the commit messages. Please make sure to choose the appropriate commit type, scope and subject.

License

MIT License

Support

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

Team

Adam Weeks Arash Koushkebaghi Lalli Flores Timothy Scheuering David Hoff
Adam Weeks Arash Koushkebaghi Lalli Flores Timothy Scheuering David Hoff

components's People

Contributors

akoushke avatar lalli-flores avatar webex-components-publisher avatar adamweeks avatar interactivetimmy avatar yusenjeng avatar taymoork2 avatar bgenaro avatar dependabot[bot] avatar

Stargazers

Roman avatar

Watchers

James Cloos 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.