storyblok-react
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -50,3 +50,3 @@ 'use strict'; | ||
} else { | ||
throw new TypeError('It seems that you are using a DOM text-node inside the SbEditable wrapper. Please wrap it with an HTML DOM element.'); | ||
console.warn('It seems that you are using a DOM text-node inside the SbEditable wrapper. Please wrap it with an HTML DOM element.', this.props.children); | ||
} | ||
@@ -53,0 +53,0 @@ } |
{ | ||
"name": "storyblok-react", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "React component for storyblok.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -7,19 +7,30 @@ # Storyblok Editable Component | ||
~~~ | ||
npm install storyblok-react --save | ||
```sh | ||
$ npm install storyblok-react --save | ||
``` | ||
import SbEditable from 'storyblok-react' | ||
~~~ | ||
### Example | ||
~~~ | ||
<SbEditable content={this.props.content}> | ||
<p> | ||
{this.props.content.text} | ||
</p> | ||
</SbEditable> | ||
~~~ | ||
```js | ||
import SbEditable from 'storyblok-react'; | ||
const Feature = (props) => ( | ||
<SbEditable content={props.content}> | ||
<div className="feature"> | ||
{props.content.name} | ||
</div> | ||
</SbEditable> | ||
); | ||
export default Feature; | ||
``` | ||
## License | ||
MIT | ||
## Contribution | ||
Fork me on [Github](https://github.com/storyblok/storyblok-react). | ||
This project use [semantic-release](https://semantic-release.gitbook.io/semantic-release/) for generate new versions by using commit messages and we use the Angular Convention to naming the commits. Check [this question](https://semantic-release.gitbook.io/semantic-release/support/faq#how-can-i-change-the-type-of-commits-that-trigger-a-release) about it in semantic-release FAQ. |
@@ -24,3 +24,3 @@ import React from 'react' | ||
} else { | ||
throw new TypeError('It seems that you are using a DOM text-node inside the SbEditable wrapper. Please wrap it with an HTML DOM element.') | ||
console.warn('It seems that you are using a DOM text-node inside the SbEditable wrapper. Please wrap it with an HTML DOM element.', this.props.children) | ||
} | ||
@@ -27,0 +27,0 @@ } |
7106
35