Skip to content

Commit cd92b5d

Browse files
committed
Add yarn and restructure headers
1 parent ecefea6 commit cd92b5d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,21 @@
1010
1111
![Demo](demo.gif)
1212

13-
# Installation
13+
## Installation
1414

15-
The easiest way to use react-checkbox-tree is to install from NPM and include it in your own React build process (e.g. using [Webpack](http://webpack.github.io/docs/what-is-webpack.html)):
15+
The easiest way to use react-checkbox-tree is to install using your favorite dependency manager and include it in your own React build process (e.g. using [Webpack](http://webpack.github.io/docs/what-is-webpack.html)):
1616

1717
```
1818
npm install react-checkbox-tree --save
1919
```
2020

21+
``` shell
22+
yarn add react-checkbox-tree
23+
```
24+
2125
> **Note** – This library makes use of [Font Awesome](http://fontawesome.io/) styles and expects them to be loaded in the browser.
2226
23-
# Usage
27+
## Usage
2428

2529
A quick usage example is included below. Note that the react-checkbox-tree component is [controlled](https://facebook.github.io/react/docs/forms.html#controlled-components). In other words, it is stateless. You must update its `checked` and `expanded` properties whenever a change occurs.
2630

@@ -61,7 +65,7 @@ class Widget extends React.Component {
6165
}
6266
```
6367

64-
## Properties
68+
### Properties
6569

6670
| Property | Type | Description | Default |
6771
| ------------------ | -------- | ------------------------------------------------------------------------------------------------ | ----------- |
@@ -74,7 +78,7 @@ class Widget extends React.Component {
7478
| `nameAsArray` | bool | If true, the hidden `<input>` will encode its values as an array rather than a joined string. | `false` |
7579
| `optimisticToggle` | bool | If true, toggling a partially-checked node will select all children. If false, it will deselect. | `true` |
7680

77-
### Node Properties
81+
#### Node Properties
7882

7983
Individual nodes within the `nodes` property can have the following structure:
8084

0 commit comments

Comments
 (0)