@fortawesome/free-solid-svg-icons#faBox JavaScript Examples
The following examples show how to use
@fortawesome/free-solid-svg-icons#faBox.
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: organization.js From climatescape.org with MIT License | 6 votes |
function AttributesSection({ org, className }) {
const topCategories = org.categories.filter(cat => !cat.parent)
const subCategories = org.categories.filter(cat => cat.parent)
// Show all sub categories as well as top categories not represented
// by sub categories
const categoryList = topCategories
.filter(
category => !subCategories.map(cat => cat.parent.id).includes(category.id)
)
.concat(subCategories)
if (!categoryList.length && !hasMeta(org)) return null
return (
<SidebarSectionList title="In a snapshot" className={className}>
{categoryList.map(category => (
<SidebarSectionList.Item
key={category.name}
text={category.name}
to={category.slug}
icon={faBox}
/>
))}
{org.location && (
<SidebarSectionList.Item text={org.location} icon={faMapMarkerAlt} />
)}
{org.orgType && (
<SidebarSectionList.Item text={org.orgType} icon={faBuilding} />
)}
{org.headcount && (
<SidebarSectionList.Item
text={`${org.headcount} employees`}
icon={faUsers}
/>
)}
</SidebarSectionList>
)
}
Example #2
Source File: organization.js From goodhere with MIT License | 6 votes |
function AttributesSection({ org, className }) {
const topCategories = org.categories.filter(cat => !cat.parent)
const subCategories = org.categories.filter(cat => cat.parent)
// Show all sub categories as well as top categories not represented
// by sub categories
const categoryList = topCategories
.filter(
category => !subCategories.map(cat => cat.parent.id).includes(category.id)
)
.concat(subCategories)
if (!categoryList.length && !hasMeta(org)) return null
return (
<SidebarSectionList title="In a snapshot" className={className}>
{categoryList.map(category => (
<SidebarSectionList.Item
key={category.name}
text={category.name}
to={category.slug}
icon={faBox}
/>
))}
{org.location && (
<SidebarSectionList.Item text={org.location} icon={faMapMarkerAlt} />
)}
{org.orgType && (
<SidebarSectionList.Item text={org.orgType} icon={faBuilding} />
)}
{org.headcount && (
<SidebarSectionList.Item
text={`${org.headcount} employees`}
icon={faUsers}
/>
)}
</SidebarSectionList>
)
}
Example #3
Source File: Navbar.js From covid-19-tracker with MIT License | 5 votes |
render() {
const { classes } = this.props;
return (
<div className={classes.navbar}>
<div className={classes.logo}>
<img src={logo} alt="logo" />
</div>
<nav className={classes.nav}>
<FontAwesomeIcon
icon={faBars}
className={classes.hamburger}
onClick={this.handleToggle}
/>
<ul
className={classNames([classes.navItems], {
[classes.expand]: this.state.isExpanded,
})}
>
<li className={classes.navItem}>
<NavLink
exact
to="/"
className={classes.navLinks}
activeClassName={classes.active}
>
<div className={classes.iconBox}>
<FontAwesomeIcon icon={faHome} className={classes.icons} />
<p>Overview</p>
</div>
</NavLink>
</li>
<li className={classes.navItem}>
<NavLink
exact
to="/symptoms"
className={classes.navLinks}
activeClassName={classes.active}
>
<div className={classes.iconBox}>
<FontAwesomeIcon
icon={faHeadSideCough}
className={classes.icons}
/>
<p>Symptoms</p>
</div>
</NavLink>
</li>
<li className={classes.navItem}>
<NavLink
exact
to="/stay-safe"
className={classes.navLinks}
activeClassName={classes.active}
>
<div className={classes.iconBox}>
<FontAwesomeIcon icon={faFlask} className={classes.icons} />
<p>Prevention</p>
</div>
</NavLink>
</li>
<li className={classes.navItem}>
<NavLink
exact
to="/essentials"
className={classes.navLinks}
activeClassName={classes.active}
>
<div className={classes.iconBox}>
<FontAwesomeIcon icon={faBox} className={classes.icons} />
<p>Essentials</p>
</div>
</NavLink>
</li>
</ul>
</nav>
</div>
);
}
Example #4
Source File: OrganizationAttributes.js From climatescape.org with MIT License | 5 votes |
OrganizationCategory = ({ text, ...props }) => (
<Tag {...props}>
<FontAwesomeIcon icon={faBox} className="mr-2" />
{text}
</Tag>
)