@fortawesome/fontawesome-svg-core#library JavaScript Examples
The following examples show how to use
@fortawesome/fontawesome-svg-core#library.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CommitLogCardComponent.js From gitconvex with Apache License 2.0 | 6 votes |
export default function CommitLogCardComponent(props) {
library.add(fas);
const { item, setCommitType } = props;
return (
<div
className="flex p-3 justify-between items-center mx-auto border-b w-full cursor-pointer hover:bg-gray-100"
key={item.hash}
onClick={() => {
setCommitType(item.hash);
}}
>
<div className="block p-2 font-sans font-light text-gray-800">
<div className="my-2 font-sans text-xl font-light text-blue-600 border-b border-dashed">
{item.commitTime.split(" ")[0]}
</div>
<div className="w-3/4">{item.commitMessage}</div>
<div className="flex items-center gap-4 my-2 align-middle">
<div>
<FontAwesomeIcon
icon={["fas", "user-alt"]}
className="text-indigo-500"
></FontAwesomeIcon>
</div>
<div className="font-semibold font-sans">{item.author}</div>
</div>
</div>
<div className="block">
<div className="shadow border rounded text-sm p-2 bg-indigo-100 font-mono font-semibold text-indigo-800">
#{item.hash.substring(0, 7)}
</div>
<div className="my-2 shadow border rounded text-sm p-2 bg-yellow-50 font-sans font-semibold">
{relativeCommitTimeCalculator(item.commitTime)}
</div>
</div>
</div>
);
}
Example #2
Source File: icons.js From WirtBot with GNU Affero General Public License v3.0 | 6 votes |
library.add( faFileDownload, faTrash, faBars, faCheckSquare, faCheck, faPlus, faCogs, faServer, faLaptop, faMobileAlt );
Example #3
Source File: ui.js From duolingo-solution-viewer with MIT License | 6 votes |
// Register the FontAwesome icons.
library.add(
faArrowFromLeft,
faArrowToRight,
faCheck,
faEquals,
faKey,
faQuestion,
faThumbtack,
faTimes
);
Example #4
Source File: fontawesome.js From make-react-apps-site with MIT License | 6 votes |
library.add( faReact, faAtom, faFieldHockey, faTreasureChest, faFilm, faCameraHome, faWatch, faPlus, faEquals, faArrowRight, faCheck )
Example #5
Source File: fontawesome.stories.js From fontawesome-module with MIT License | 6 votes |
Icons = () => ({
props: {
size: {
type: String,
default: 'fa-2x'
},
onClick: {
type: Function,
default: () => () => {}
}
},
components: { IconsList },
data () {
return {
icons: getLibIcons(library)
}
},
template: '<IconsList :icons="icons" :size="size" :onClick="onClick" />'
})
Example #6
Source File: faLibrary.js From cosmoscan-front with Apache License 2.0 | 6 votes |
library.add( faBars, faTimes, faChevronDown, faChevronUp, faCalendarAlt, faTelegramPlane, faTwitter, faMediumM, faRedditAlien, faQuestionCircle, faCheck, faSearch, );
Example #7
Source File: fontawesome.stories.js From fontawesome-module with MIT License | 6 votes |
getLibIcons = (library) => {
const data = library.definitions
const toPascalCase = (str) => {
const camelCase = str.replace(/-([a-z])/g, val => val[1].toUpperCase())
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1)
}
return (Object.keys(data).map(key =>
Object.keys(data[key]).map(value => [key, value, key + toPascalCase(value)])
)).reduce((current, next) => current.concat(next), [])
}
Example #8
Source File: App.js From lrc-staking-dapp with MIT License | 6 votes |
library.add( far, fas, faBookReader, faArrowLeft, faArrowRight, faQuestionCircle, faCopy, faSignOutAlt, faEdit, faAngleDown, faExternalLinkAlt, fab, faEthereum, faTwitter, faDiscord, faUnlink, faSearch, faFortAwesome, faExchangeAlt, faChartPie, faGlobe, faDonate, faDollarSign, );
Example #9
Source File: _app.jsx From teach-yourself-code with MIT License | 6 votes |
library.add( faHome, faInfoCircle, faUser, faYoutube, faBookmark, faSignOutAlt, faCaretDown, faArrowAltCircleLeft, faArrowAltCircleRight, faAtom, faMap );
Example #10
Source File: app.jsx From jitsi-party with MIT License | 5 votes |
// Allow arbitrary icons to be used without importing them
library.add(fas)
Example #11
Source File: index.js From Kurakoo with MIT License | 5 votes |
library.add(faEyeSlash, faEye);
Example #12
Source File: CompareSelectionHint.js From gitconvex with Apache License 2.0 | 5 votes |
export default function CompareSelectionHint() {
library.add(fas);
const selectionHints = [
{
message: (
<div className="my-10 font-sans text-xl font-semibold">
Select
<span className="mx-2 p-1 rounded-lg text-center text-white bg-gray-400">
Branch Compare
</span>
for comparing two branches
</div>
),
icon: "code-branch",
},
{
message: "",
icon: "",
},
{
message: (
<div className="my-10 font-sans text-xl font-semibold">
Select
<span className="mx-2 p-1 rounded-lg text-center text-white bg-gray-400">
Commit Compare
</span>
for comparing two selected commits
</div>
),
icon: "hashtag",
},
];
return (
<div className="flex justify-around my-6 mx-auto text-gray-300 gap-10 w-11/12">
{selectionHints.map((hint, index) => {
if (hint.message) {
return (
<div className="w-1/3 block text-center" key={`hint-${index}`}>
<div>
<FontAwesomeIcon
icon={["fas", hint.icon]}
size="10x"
></FontAwesomeIcon>
</div>
{hint.message}
</div>
);
} else {
return (
<div
className="block p-1 border-r-4 boreder-dashed"
key={`hint-${index}`}
></div>
);
}
})}
</div>
);
}
Example #13
Source File: main.js From CursedChrome with MIT License | 5 votes |
library.add(fab)
Example #14
Source File: icon.js From uptime-kuma with MIT License | 5 votes |
library.add( faArrowAltCircleUp, faCog, faEdit, faEye, faEyeSlash, faList, faPause, faPlay, faPlus, faSearch, faTachometerAlt, faTimes, faTimesCircle, faTrash, faCheckCircle, faStream, faSave, faExclamationCircle, faBullhorn, faArrowsAltV, faUnlink, faQuestionCircle, faImages, faUpload, faCopy, faCheck, faFile, faAward, faLink, faChevronDown, faSignOutAlt, faPen, faExternalLinkSquareAlt, faSpinner, faUndo, faPlusCircle, faAngleDown, faLink, );
Example #15
Source File: Token.jsx From monopoly with GNU General Public License v3.0 | 5 votes |
library.add(faHatCowboySide, faDog, faCar, faCat, faShip, faDollarSign, faFrog);
Example #16
Source File: RegisterFaIcons.jsx From frontend-app-authn with GNU Affero General Public License v3.0 | 5 votes |
export default function registerIcons() {
library.add(faApple, faFacebook, faGoogle, faMicrosoft);
}
Example #17
Source File: index.js From ActiveLearningStudio-react-client with GNU Affero General Public License v3.0 | 5 votes |
library.add(far);
Example #18
Source File: main.js From minimal-portfolio with GNU General Public License v3.0 | 5 votes |
library.add(fas)
Example #19
Source File: globalStyle.js From personal-site with MIT License | 5 votes |
library.add(fab, faEnvelope, faPaperclip, faExternalLinkAlt, faFire, faCross)
Example #20
Source File: App.js From portal with GNU General Public License v3.0 | 5 votes |
library.add(fas);
Example #21
Source File: Fontawesome.js From gatsby-personal-site-template with MIT License | 5 votes |
library.add(fab, fas)
Example #22
Source File: App.js From littlelink-server with MIT License | 5 votes |
library.add(fab, fas, far);
Example #23
Source File: FontAwesomeIcon.jsx From tonic-ui with MIT License | 5 votes |
library.add(fab);
Example #24
Source File: main.js From sls-app with MIT License | 5 votes |
// Font-awesome library
library.add(faImages, faGlobe, faArrowCircleLeft)
Example #25
Source File: fontawesome.js From xmrig-workers with GNU General Public License v3.0 | 5 votes |
export default function () {
library.add(faGithub, faWindows, faLinux, faTwitter, faReddit, faTelegram, faCheckCircle, faMicrochip, faTrashAlt,
faPaperPlane, faSpinner, faFlask, faInfoCircle, faPen, faTools, faCheck, faPlus, faCog, faExclamationTriangle,
faQuestionCircle, faSyncAlt, faInfinity, faDownload, faCopy, faPlug, faTimesCircle);
}
Example #26
Source File: icons_library.js From official-website-backend with MIT License | 5 votes |
// Adding all the icons we need in the project
library.add(faHeart, faFire, faPalette, faMapPin, faMapMarker, faPhone, faMailBulk);
Example #27
Source File: Icon.js From mailmask with GNU Affero General Public License v3.0 | 5 votes |
library.add(...(Object.values(ICONS)))
Example #28
Source File: App.js From dmm-web-app with MIT License | 5 votes |
library.add(fab);
Example #29
Source File: globalStyle.js From bartzalewski.com-v2 with MIT License | 5 votes |
library.add(fab, faEnvelope, faPaperclip, faExternalLinkAlt, faFire, faCross)