File tree 2 files changed +6
-4
lines changed
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
54
54
55
55
## Usage
56
56
57
- Given you have ` html-react-parser ` imported:
57
+ Given ` html-react-parser ` is imported:
58
58
59
59
``` js
60
60
// ES Modules
@@ -89,13 +89,15 @@ class App extends Component {
89
89
Parse nested elements:
90
90
91
91
``` js
92
- parse (' <ul><li>text </li></ul>' );
92
+ parse (' <ul><li>item </li></ul>' );
93
93
```
94
94
95
95
Parse element with attributes:
96
96
97
97
``` 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
+ );
99
101
```
100
102
101
103
### Options
Original file line number Diff line number Diff line change 36
36
"dependencies" : {
37
37
"@types/domhandler" : " 2.4.1" ,
38
38
"html-dom-parser" : " 0.2.1" ,
39
- "react-dom-core" : " 0.0.4 " ,
39
+ "react-dom-core" : " 0.1.1 " ,
40
40
"style-to-object" : " 0.2.2"
41
41
},
42
42
"devDependencies" : {
You can’t perform that action at this time.
0 commit comments