aframevr/aframe-inspector

Use icons from @fortawesome/react-fontawesome

vincentfretin opened this issue · 0 comments

For GDPR reason to have one less external url to fetch resources from, and as a bonus reduce size of downloaded assets, replace usage of https://maxcdn.bootstrapcdn.com used for fontawesome icons

// Megahack to include font-awesome.
injectCSS(
'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'
);

by @fortawesome/react-fontawesome npm package.
That's it, instead of using class "fa fa-pause" on an element, you use

import { faPause } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
<FontAwesomeIcon icon={faPause} />