Skip to content

Commit

Permalink
Merge pull request #4 from tsuki42/props-except-html
Browse files Browse the repository at this point in the history
Pass props to the outer div except the `html` prop.
  • Loading branch information
christo-pr authored May 11, 2020
2 parents 4c346aa + 7e089ce commit 34897e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useRef } from 'react'

function DangerouslySetHtmlContent(props) {
const { html } = props
const { html, ...rest } = props
const divRef = useRef(null)

useEffect(() => {
Expand All @@ -12,7 +12,7 @@ function DangerouslySetHtmlContent(props) {


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

Expand Down

0 comments on commit 34897e0

Please sign in to comment.