I just upgraded my fontawesome to 6.0.0
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-brands-svg-icons": "^6.0.0",
"@fortawesome/free-regular-svg-icons": "^6.0.0",
"@fortawesome/free-solid-svg-icons": "^6.0.0",
"@fortawesome/react-fontawesome": "^0.1.16",
The problem I am facing is when adding an Icon inside a button with a parent div.
This does not show the Icon
<div>
<button>
<FontAwesomeIcon
icon={faHeart}
size="2x"
className={`transform motion-safe:group-focus:scale-110 p-1.5 z-10`}
aria-hidden="true"
/>
</button>
</div>
If I change it to a simple parent div it shows up correctly.
<div>
<div>
<FontAwesomeIcon
icon={faHeart}
size="2x"
className={`transform motion-safe:group-focus:scale-110 p-1.5 z-10`}
aria-hidden="true"
/>
</div>
</div>
Does anyone one why or how to make it work with a button?