Skip to content

Commit

Permalink
default value , __html
Browse files Browse the repository at this point in the history
  • Loading branch information
TigranBoomTech committed Jul 12, 2024
1 parent 7eec584 commit 6a55852
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Reset/Reset.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react'

const Reset = ({ text, onReset, reset }) => {
const Reset = ({ text = 'Reset', onReset, reset }) => {
const handleClick = e => {
e.preventDefault()
if(onReset) onReset(reset);
if (onReset) onReset(reset)
}

return (
Expand All @@ -12,8 +12,8 @@ const Reset = ({ text, onReset, reset }) => {
onClick={e => {
handleClick(e)
}}
dangerouslySetInnerHTML={text}
/>
dangerouslySetInnerHTML={{ __html: text }}
/>
</div>
)
}
Expand Down

0 comments on commit 6a55852

Please sign in to comment.