File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ $ yarn add html-react-parser
5454
5555## Usage
5656
57- Given you have ` html-react-parser ` imported:
57+ Given ` html-react-parser ` is imported:
5858
5959``` js
6060// ES Modules
@@ -89,13 +89,15 @@ class App extends Component {
8989Parse nested elements:
9090
9191``` js
92- parse (' <ul><li>text </li></ul>' );
92+ parse (' <ul><li>item </li></ul>' );
9393```
9494
9595Parse element with attributes:
9696
9797``` js
98- parse (' <hr id="foo" class="bar" data-baz="qux">' );
98+ parse (
99+ ' <hr id="foo" class="bar" data-attr="baz" custom="qux" style="top:42px;">'
100+ );
99101```
100102
101103### Options
Original file line number Diff line number Diff line change 3636 "dependencies" : {
3737 "@types/domhandler" : " 2.4.1" ,
3838 "html-dom-parser" : " 0.2.1" ,
39- "react-dom-core" : " 0.0.4 " ,
39+ "react-dom-core" : " 0.1.1 " ,
4040 "style-to-object" : " 0.2.2"
4141 },
4242 "devDependencies" : {
You can’t perform that action at this time.
0 commit comments