Created
February 7, 2019 20:01
-
-
Save nsisodiya/5cef0db527141a2dc5922e5b374c345c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | |
| <Icon color='red' size='6x' rotation={270} icon="ambulance" /> | |
| </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