diff --git a/package.json b/package.json index a76237e..d93588c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-styleguide-example", - "version": "0.1.0", + "version": "0.2.0", "description": "Example of react-styleguide usage.", "main": "src/index.jsx", "author": "Robert Haritonov ", @@ -11,8 +11,9 @@ }, "dependencies": { "react": "^0.13.3", - "sourcejs": "^0.6.0-nightly.0", + "sourcejs": "^0.6.0-nightly.1", "sourcejs-react": "operatino/sourcejs-react", - "sourcejs-webpack": "^0.1.0" + "sourcejs-react-docgen": "^0.1.0", + "sourcejs-webpack": "^0.2.0" } } diff --git a/src/index.jsx b/src/index.jsx index 2dbaaf5..535c512 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -2,8 +2,14 @@ var React = require('react/addons'); +/** + * General component description. Defined in component's code (like JSDoc). + */ module.exports = React.createClass({ propTypes: { + /** + * Description of prop "modifier". + */ modifier: React.PropTypes.string }, getDefaultProps: function getDefaultProps() { diff --git a/styleguide.jsx b/styleguide.jsx index 3f0a4d5..62eccd1 100644 --- a/styleguide.jsx +++ b/styleguide.jsx @@ -18,6 +18,10 @@ module.exports = React.createClass({

Default

+

<%- info.__docGenRaw.description %>

+ + <%- info.__docGenHTML %> + {``}