-
Notifications
You must be signed in to change notification settings - Fork 123
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
Font awesome icon doesn't work with React #92
Comments
could you share a bit more about your situation? some good stuff to see would be:
|
Thanks for your reply. This was exactly what i did: ...
import * as L from 'leaflet';
import 'leaflet-draw';
import 'leaflet-draw/dist/leaflet.draw.css';
import 'leaflet-draw/dist/leaflet.draw-src.css';
import 'leaflet-easybutton';
import 'leaflet-easybutton/src/easy-button.css';
...
L.easyButton('fa-trash',() => {
// clear layer on new layer
this.clearLayer(map);
}).addTo(map); But it shows like corrupted icon. |
is font awesome installed and imported? |
Yes and yes |
gotcha. Did you check the existing issues? there's this one that mentions some issues with recent versions of Font Awesome. Does that issue line up with your experience? |
Yes is the same issue! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a React application. To enable Font Awesome icon i added, before use L.easyButton,
import 'font-awesome/css/font-awesome.min.css';
but it doesn't work.It seems to be an incompatibility of Font Awesome with React. Did you try to use your library with React?
The text was updated successfully, but these errors were encountered: