Reputation: 63
Using React, free FA icons
I want FA icon as a button, how can I do that?
My effort: <button onClick={handleLogout}><FontAwesomeIcon className="logouticon" icon={faArrowRightFromBracket} color="white" /></button>
But it is not working, because the icon is behind the blank default button design.
Upvotes: 0
Views: 1910
Reputation: 1512
If you only want to use button for on click event. Then you can remove it and add on click to fa icon
<FontAwesomeIcon className="logouticon" icon={faArrowRightFromBracket} color="white" onClick={handleLogout} />
Upvotes: 1