Skip to content
This repository was archived by the owner on Oct 18, 2018. It is now read-only.

Commit 26c6aac

Browse files
authored
Merge pull request #23 from hckhanh/build
Update content in README
2 parents 0e0a492 + e7c1466 commit 26c6aac

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,22 @@ npm install --save react-tree-es6
2020

2121
## Usage
2222

23-
import/require `ReactTree` to your React source code:
23+
import/require `ReactTree` in your source code:
2424

2525
```js
2626
import ReactTree from 'react-tree-es6';
2727
```
2828

29+
and add this component into your `render()` function:
30+
31+
```js
32+
render() {
33+
<ReactTree core={CORE} onChanged={this.handleOnChanged} />
34+
}
35+
```
36+
37+
**Go to [example](example) folder to get more details.**
38+
2939
### core
3040

3141
`core` is the jsTree object contains basic data and configurations of the tree.
@@ -71,7 +81,7 @@ As you know, a tree has one or many nodes, here is the full structure of a node:
7181
}
7282
```
7383

74-
You can define a `core` object and then parse it to `core` property:
84+
You can define a `core` object and then put it to `core` property:
7585

7686
```js
7787
const CORE = {
@@ -100,7 +110,7 @@ class ExampleApp extends React.Component {
100110
}
101111
```
102112

103-
> To make sure you can find what you need, go to [jsTree API](https://www.jstree.com/api) for more details.
113+
**To make sure you can find what you need, go to [jsTree API](https://www.jstree.com/api) for more details.**
104114

105115
### onChanged
106116

@@ -152,14 +162,12 @@ class ExampleApp extends React.Component {
152162
}
153163
```
154164

155-
If you need detailed example, go to [example](example) folder.
156-
157165
### Themes
158166

159167
If user want to apply css for **ReactTree**, consider to include these files to your web app:
160168

161-
* node_modules/jstree/dist/themes/default/style.min.css
162-
* node_modules/jstree/dist/themes/default-dark/style.min.css
169+
* node_modules/jstree/dist/themes/**default**/style.min.css
170+
* node_modules/jstree/dist/themes/**default-dark**/style.min.css
163171

164172
with additional options in `core` object, for instance with **default-dark** theme:
165173

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-tree-es6",
3-
"version": "1.0.0-0",
3+
"version": "1.0.0",
44
"description": "The wrapper of jsTree (jstree.com) for React",
55
"main": "./lib/react-tree.js",
66
"scripts": {

0 commit comments

Comments
 (0)