Skip to content

Commit 29ce35e

Browse files
author
kiran
committed
updated docs
1 parent f9563ce commit 29ce35e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ React component for syntax highlighting using highlight.js
66
### Installation
77
```bash
88
npm install react-highlight --save
9-
```
9+
```
1010

1111
### Usage
1212
#### Importing component
@@ -22,6 +22,11 @@ Choose the [theme](https://highlightjs.org/static/demo/) for syntax highlighting
2222

2323
The styles will most likely be in `node_modules/highlight.js/styles` folder.
2424

25+
Props:
26+
* className: custom class name
27+
* innerHTML: enable to render markup with dangerouslySetInnerHTML
28+
* element: render code snippet inside specified element
29+
2530
#### Syntax highlighting of single code snippet
2631
Code snippet that requires syntax highlighting should be passed as children to Highlight component in string format. Language name of code snippet should be specified as className.
2732

@@ -39,6 +44,6 @@ This is especially usefull if html with multiple code snippets is generated from
3944

4045
```html
4146
<Highlight innerHTML={true}>
42-
{"html with multiple code snippets"}
47+
{"html with multiple code snippets"}
4348
</Highlight>
4449
```

0 commit comments

Comments
 (0)