Skip to content

Commit

Permalink
(docs) improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBaptisteWATENBERG committed May 27, 2018
1 parent 13ac37c commit c21a275
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,40 @@

![alt text](docs/react-jsonpath-editor.png "React json path editor")

## Usage

install the dependency using `npm` or `yarn`

```
npm i --save react-jsonpath-editor
```


```
yarn add react-jsonpath-editor
```

```javascript
import React, {Component} from 'react'
import JsonPathEditor from 'react-jsonpath-editor';

class App extends Component {
render() {
return <div>
<JsonPathEditor />
</div>;
}
}
```

## Properties

| Props | Type | Required | Description |
|:-------------:|:-------------:|:---------:|-------------------------------------------------------|
| inputProps | object | false | Properties passed down to the input |
| value | string | false | input default value |
| json | object | false | json to test the json path and provide autocompletion |
| onChange | function | false | callback called when jsonPath changed |

[build-badge]: https://img.shields.io/travis/JeanBaptisteWATENBERG/react-jsonpath-editor/master.png?style=flat-square
[build]: https://travis-ci.org/JeanBaptisteWATENBERG/react-jsonpath-editor
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@
"react": "^16.4.0",
"react-dom": "^16.4.0"
},
"author": "",
"homepage": "",
"author": "Jean-Baptiste WATENBERG",
"homepage": "https://github.com/JeanBaptisteWATENBERG/react-jsonpath-editor",
"license": "MIT",
"repository": "",
"repository": "https://github.com/JeanBaptisteWATENBERG/react-jsonpath-editor",
"keywords": [
"react-component"
"react-component",
"jsonpath",
"react",
"component"
]
}

0 comments on commit c21a275

Please sign in to comment.