diff --git a/README.md b/README.md index b8ab016..7e014a6 100644 --- a/README.md +++ b/README.md @@ -1 +1,42 @@ # react-markdown-renderer + +[![Build Status](https://travis-ci.org/InsidersByte/react-markdown-renderer.svg)](https://travis-ci.org/InsidersByte/react-markdown-renderer) +[![Dependency Status](https://david-dm.org/insidersbyte/react-markdown-renderer.svg)](https://david-dm.org/insidersbyte/react-markdown-renderer) +[![peerDependency Status](https://david-dm.org/insidersbyte/react-markdown-renderer/peer-status.svg)](https://david-dm.org/insidersbyte/react-markdown-renderer#info=peerDependencies) +[![devDependency Status](https://david-dm.org/insidersbyte/react-markdown-renderer/dev-status.svg)](https://david-dm.org/insidersbyte/react-markdown-renderer#info=devDependencies) + +Simple React component that renders Markdown + +## Installing + +```bash +npm install react-markdown-renderer +``` + +## Usage + +```js +import React from 'react'; +import ReactDOM from 'react-dom'; +import MarkdownRenderer from 'react-markdown-renderer'; + +const markdown = '# This is an H1 \n## This is an H2 \n###### This is an H6'; + +ReactDOM.render( + , + document.getElementById('content') +); +``` + +## Props + +* markdown (*string*) - the raw markdown that will be converted to html (**required**) +* className (*string*) - css classes to add to the component (default: ''). + +## Contributing + +Contributions are very welcome! Please note that by submitting a pull request for this project, you agree to license your contribution under the [MIT License](https://github.com/insidersbyte/react-markdown-renderer/blob/master/LICENSE) to this project. + +## License + +Published under the [MIT License](https://github.com/insidersbyte/react-markdown-renderer/blob/master/LICENSE). diff --git a/package.json b/package.json index 22d7371..b8f56aa 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-markdown-renderer", "version": "0.1.1", - "description": "Render markdown as a React component", + "description": "Simple React component that renders Markdown", "main": "lib/index.js", "files": [ "lib"