Last active
February 8, 2019 09:28
-
-
Save nsisodiya/7dc2b7f52f6c19f0389a0421db0de2b2 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"; | |
| var faMyCarIcon = { | |
| prefix: "fas", | |
| iconName: "mycar", | |
| icon: [ | |
| 512, | |
| 512, | |
| [], | |
| "f0000", | |
| "M110.933,287.834c-23.526,0-42.667,19.14-42.667,42.667c0,23.526,19.14,42.667,42.667,42.667 c23.526,0,42.667-19.14,42.667-42.667C153.6,306.975,134.46,287.834,110.933,287.834z M110.933,356.101 c-14.114,0-25.6-11.486-25.6-25.6s11.486-25.6,25.6-25.6s25.6,11.486,25.6,25.6S125.047,356.101,110.933,356.101z M503.467,287.834v-51.2c0-3.669-2.347-6.938-5.837-8.098l-48.145-16.051c-18.133-30.711-43.059-59.938-98.142-69.589 c-0.102-0.017-0.205-0.034-0.307-0.051c-101.726-14.063-178.099,8.883-227.132,68.224c-36.497,0.529-73.754,8.158-95.667,22.187 c-11.349,7.27-18.082,19.925-18.714,33.391l-0.99,21.188c-4.71,0-8.533,3.823-8.533,8.533v34.133c0,4.71,3.823,8.533,8.533,8.533 h34.133c4.736,0,8.525-3.891,8.533-8.627c0-0.043,0.009-0.085,0.009-0.137c0.128-32.879,26.812-59.503,59.725-59.503 c32.99,0,59.733,26.743,59.733,59.733c-0.614,5.18,3.473,8.533,8.533,8.533h153.6c4.736,0,8.525-3.891,8.533-8.627 c0-0.043,0.008-0.085,0.008-0.137c0.128-32.879,26.812-59.503,59.725-59.503c32.99,0,59.733,26.743,59.733,59.733 c-0.614,5.18,3.473,8.533,8.533,8.533h34.133c4.71,0,8.533-3.823,8.533-8.533v-34.133 C512,291.657,508.177,287.834,503.467,287.834z M273.067,206.768c0,2.355-1.911,4.267-4.267,4.267H157.517 c-3.942,0-5.734-4.847-2.825-7.501c29.611-26.991,67.268-42.428,113.673-46.532c2.5-0.222,4.702,1.792,4.702,4.301V206.768z M375.586,206.81c-0.026,2.338-1.929,4.224-4.267,4.224H294.4c-2.355,0-4.267-1.911-4.267-4.267v-46.592 c0-2.364,1.886-4.309,4.241-4.309c17.015-0.017,35.021,1.22,54.161,3.866c9.114,1.604,17.237,3.806,24.627,6.511 c1.698,0.623,2.782,2.27,2.765,4.079L375.586,206.81z M420.122,211.034h-23.202c-2.372,0-4.292-1.937-4.267-4.309l0.222-23.125 c0.034-3.524,4.053-5.436,6.895-3.354c9.225,6.741,16.896,14.771,23.731,23.885C425.634,206.972,423.671,211.034,420.122,211.034z M401.067,287.834c-23.526,0-42.667,19.14-42.667,42.667c0,23.526,19.14,42.667,42.667,42.667 c23.526,0,42.667-19.14,42.667-42.667C443.733,306.975,424.593,287.834,401.067,287.834z M401.067,356.101 c-14.114,0-25.6-11.486-25.6-25.6s11.486-25.6,25.6-25.6c14.114,0,25.6,11.486,25.6,25.6S415.181,356.101,401.067,356.101z" | |
| ] | |
| }; | |
| library.add(faMyCarIcon); | |
| function App() { | |
| return ( | |
| <div className="App"> | |
| <h1>Hacking Font-Awesome</h1> | |
| <div> | |
| Power of font-awesome on Custom Icon :{" "} | |
| <Icon color="red" size="6x" rotation={270} icon="mycar" /> | |
| <pre> | |
| <Icon color='red' size='6x' rotation={270} icon="mycar" /> | |
| </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