Skip to content

Instantly share code, notes, and snippets.

@nsisodiya
Created February 7, 2019 20:01
Show Gist options
  • Select an option

  • Save nsisodiya/5cef0db527141a2dc5922e5b374c345c to your computer and use it in GitHub Desktop.

Select an option

Save nsisodiya/5cef0db527141a2dc5922e5b374c345c to your computer and use it in GitHub Desktop.
import React from "react";
import ReactDOM from "react-dom";
import { library } from "@fortawesome/fontawesome-svg-core";
import { FontAwesomeIcon as Icon } from "@fortawesome/react-fontawesome";
import { faAmbulance } from "@fortawesome/free-solid-svg-icons";
library.add(faAmbulance);
console.log("faAmbulance", faAmbulance);
function App() {
return (
<div className="App">
<h1>Hacking Font-Awesome</h1>
<div>
Icon from font-awesome :{" "}
<Icon color="red" size="6x" rotation={270} icon="ambulance" />
<pre>
&lt;Icon color='red' size='6x' rotation={270} icon="ambulance" /&gt;
</pre>
</div>
</div>
);
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment