Skip to content

Commit

Permalink
Merge pull request #3 from christo-pr/bug/style-outer-div
Browse files Browse the repository at this point in the history
Pass the props to the outer div
  • Loading branch information
christo-pr authored Apr 30, 2020
2 parents d75bcf5 + ce0575b commit 4c346aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function App() {

return (
<div>
<InnerHTML html={content} />
<InnerHTML style={{color: "white", background: "red"}} html={content} />
<button onClick={() => setContent(updatedHtml)}>Hit here to see magic!</button>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dangerously-set-html-content",
"version": "1.0.3",
"version": "1.0.4",
"description": "Render raw html at your own risk!",
"author": "christo-pr",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function DangerouslySetHtmlContent(props) {


return (
<div ref={divRef}></div>
<div {...props} ref={divRef}></div>
)
}

Expand Down

0 comments on commit 4c346aa

Please sign in to comment.