Closed jayqui closed 7 years ago
Did you include the font awesome CSS somewhere as stated in the readme? That's probably it 😉
Yes indeed! Given I'm using yarn with es6 import (given I'm using the latest create-react-app
framework), the following was the remedy:
yarn add font-awesome
ControlPanel.js
import 'font-awesome/css/font-awesome.css';
😜 Thought so! Glad you got it working 👍
I feel like this is an ignorant question, but I can't seem to get
react-fontawesome
working correctly.As you'll see from this screenshot, the expected
<span>
withfa fa-search
classes resulting from my<FontAwesome />
component does show up in the DOM tree in my Chrome devtools. However, Chrome displays it as having dimensions of0 x 0
, even if I try to force it to have a determinate width and height.I'm inside a
create-react-app
, and the component in question looks like this:ControlPanel.js
package.json