You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-50Lines changed: 46 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,8 @@
17
17
18
18
**Webex Components** is a set of [React](https://reactjs.org) components following Webex standard styling, aimed at react developers that want to embed the components into their applications.
**Webex Components** are built with [Momentum UI](https://github.com/momentum-design/momentum-ui) React components. We need to externally import all the fonts, icons, images and core *CSS* manually. There are two ways to do this:
37
-
38
-
### 1. CSS
39
-
1. Copy the `@momentum-ui/core/fonts` directory to the 'fonts' directory for your site.
40
-
2. Copy the `@momentum-ui/core/images` directory to the 'images' directory for your site.
41
-
3. Copy the `@momentum-ui/core/css/momentum-ui.min.css` to your styles/css directory.
42
-
4. In the `<head>`, of your HTML reference the location of your momentum-ui.min.css:
1. Add `$brand-font-folder` and `$icon-font-path` variables to the top of your app's Sass file.
49
36
37
+
We need to externally 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:
50
38
51
-
```scss
52
-
$brand-font-folder: "~@momentum-ui/core/fonts";
53
-
$icon-font-path: "~@momentum-ui/icons/fonts";
54
-
```
39
+
### 1. JavaScript
55
40
56
-
2. Import `@momentum-ui/core/scss/momentum-ui-components` into your main entry Sass file AFTER the variables.
Once Momentum styles have been imported into your project, you can start using the components. For example:
53
+
Once Webex styles have been imported into your project, you can start using the components. For example:
66
54
67
-
```js
68
-
import {WebexAvatar} from '@webex/components';
55
+
```js
56
+
import {WebexAvatar} from'@webex/components';
69
57
70
-
function App() {
71
-
return (
72
-
<divclassName='App'>
73
-
<WebexAvatartitle='Webex Avatar' />
74
-
</div>
75
-
);
76
-
}
58
+
functionApp() {
59
+
return (
60
+
<div className="App">
61
+
<WebexAvatar title="Webex Avatar"/>
62
+
</div>
63
+
);
64
+
}
77
65
78
-
export default App;
79
-
```
66
+
exportdefaultApp;
67
+
```
80
68
81
-
*Happy Coding!*
69
+
_Happy Coding!_
82
70
83
71
## Contributing
72
+
84
73
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](https://github.com/webex/components/blob/master/CONTRIBUTING.md) that we'd like you to follow.
85
74
86
75
### Issues
76
+
87
77
Please open an [issue](https://github.com/webex/components/issues) and we will get to it in an orderly manner.
88
78
Please leave as much as information as possible for a better understanding.
79
+
89
80
### Contributing Code
81
+
90
82
We are using [Webex Style Guide eslint rule](https://github.com/webex/web-styleguide/tree/master/packages/node_modules/%40webex/eslint-config-react) and [prettier](https://github.com/prettier/prettier) to lint the code style.
91
83
You can "prettify" your code before committing via:
92
84
93
-
```bash
94
-
npm run prettier:write
95
-
```
85
+
```bash
86
+
npm run prettier:write
87
+
```
96
88
97
89
### Release Process
90
+
98
91
There is a list of commit types provided [here](https://github.com/webex/components/blob/master/CONTRIBUTING.md#type). However, not all commits trigger our release process.
99
92
We are using [semantic-release](https://github.com/semantic-release/semantic-release) to fully automate the version management and package publishing.
100
93
By default `semantic-release` uses the [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) and triggers release and publishing based on the following rules:
101
94
102
-
|Commit|Release type|
103
-
|------|------------|
104
-
|Commit with type `BREAKING CHANGE`| Major release|
|Commit with type `BREAKING CHANGE`| Major release|
98
+
|Commit with type `feat`| Minor release|
99
+
|Commit with type `fix`| Patch release|
100
+
|Commit with type `perf`| Patch release|
108
101
109
102
#### Commit linter
103
+
110
104
We are using [commitlint](https://github.com/conventional-changelog/commitlint) to lintify the commit messages.
111
105
Please make sure to choose the appropriate commit [type](https://github.com/webex/components/blob/master/CONTRIBUTING.md#type), [scope](https://github.com/webex/components/blob/master/CONTRIBUTING.md#scope) and [subject](https://github.com/webex/components/blob/master/CONTRIBUTING.md#scope).
112
106
@@ -115,9 +109,11 @@ Please make sure to choose the appropriate commit [type](https://github.com/webe
0 commit comments