I recently implemented an opacity slider using React hooks in my project. Here is a snippet of the code:
https://i.sstatic.net/m0JtM.png
Within my table, I set the opacity like this:
<td>
<img
src="link"
opacity={data.socialOpacity}
}
/>
</td>
However, when I view the DOM in my app, the opacity value appears as a string instead of a number:
<img src="https://wp-iframe.icon.webp" color="#000" opacity="1">
I'm puzzled as to why the opacity value is being displayed as a string and not a number. Any insights on this issue?