Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to view rendered icon #60

Closed
fergatron opened this issue Dec 4, 2017 · 4 comments
Closed

Unable to view rendered icon #60

fergatron opened this issue Dec 4, 2017 · 4 comments

Comments

@fergatron
Copy link

Hi,
I installed react-fontawesome via npm and imported it into my React app. When I run the app I see the HTML render, but there's no ICON. Looking at web developer tools in Chrome I also don't see any CSS assignments nor a font-awesome css call in the network tab.

import FontAwesome from 'react-fontawesome';

<FontAwesome name='facebook' />
@prymorsk
Copy link

prymorsk commented Dec 6, 2017

In your public folder add this line to your index.html file:
<link href='https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' rel='stylesheet' integrity='sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN' crossorigin='anonymous'>

@ivanberry
Copy link

Problem still:

  • install react-fontawesome
  • include font-awesome css with CDN or with npm and import
  • In Google DevTools, the font-awesome.css show
  • still fail to see the icons
    image

@danawoodman
Copy link
Owner

@ivanberry can you try to see if FontAwesome works without react-fontawesome? Just try <span className="fa fa-rocket" /> and see if the icon renders? If it doesn't, your issue is with the CSS not loading for some reason. Also check inspector to see if the font file is being loaded.

Gonna close but re-open if after those steps you still think it is react-fontawesome 👍

@fergatron
Copy link
Author

fergatron commented Jan 9, 2018

Sorry I never got back to you. As stated the solution was for me to include the CSS file. For some reason I figured it would have been part of the package. I'm still wrapping my head around NPM.

@ivanberry it looks like you misspelled "rocket".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants