@fortawesome/free-brands-svg-icons#faDev JavaScript Examples
The following examples show how to use
@fortawesome/free-brands-svg-icons#faDev.
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: UserLinks.js From paigeniedringhaus.com with MIT License | 5 votes |
UserLinks = (props) => {
const { config } = props;
const getLinkIcons = (icon) => {
switch (icon) {
case 'faGithub':
return <FontAwesomeIcon icon={faGithub} />;
case 'faTwitter':
return <FontAwesomeIcon icon={faTwitter} />;
case 'faEnvelope':
return <FontAwesomeIcon icon={faEnvelope} />;
case 'faMedium':
return <FontAwesomeIcon icon={faMedium} />;
case 'faDev':
return <FontAwesomeIcon icon={faDev} />;
}
};
const getLinkElements = () => {
const { userLinks } = config;
return userLinks.map((link) => (
<a
href={link.url}
target="_blank"
rel="noopener noreferrer"
key={link.label}
>
{getLinkIcons(link.iconClassName)}
<div className="user-link-text">{link.label}</div>
</a>
));
};
const { userLinks, siteRss } = config;
if (!userLinks) {
return null;
}
return (
<div className="user-links">
{getLinkElements()}
<a href={siteRss} target="_blank" rel="noopener noreferrer">
<FontAwesomeIcon icon={faRssSquare} />
<div>RSS</div>
</a>
</div>
);
}