@cseitz/icons
v1.0.3
Published
Wraps a FontAwesome Icon into a React Component - FontAwesome Pro requires a license to use pro icons, but [@cseitz](http://github.com/cseitz) is paying for one! - This package and its subsequent icon packs are a slightly modified copy of the FontAwesome
Downloads
2
Readme
Wraps a FontAwesome Icon into a React Component
- FontAwesome Pro requires a license to use pro icons, but @cseitz is paying for one!
- This package and its subsequent icon packs are a slightly modified copy of the FontAwesome Pro icon packs!
Icon Packs
All FontAwesome Pro icons are split into icon packs given the style of icon you want.
You can install packs via npm install @cseitz/icons-[STYLE]
npm install @cseitz/icons @cseitz/icons-regular
Then, import the icon you want using the icon's kebab case filepath:
import { faUserPlus } from '@cseitz/icons-regular/user-plus';
// OR, use the symlink generated by @cseitz/icons (PREFERRED USAGE)
import { faUserPlus } from '@cseitz/icons/regular/user-plus';
// FontAwesome's package import (REQUIRES PAID LICENSE NPM TOKEN TO INSTALL)
import { faUserPlus } from '@fortawesome/pro-regular-svg-icons';
Then, wrap it in the Icon
component and you're good to go!
import { Icon } from '@cseitz/icons';
const UserPlusIcon = Icon(faUserPlus);
return <UserPlusIcon />
Example
import { Icon } from '@cseitz/icons';
import { faGithub } from '@cseitz/icons/brands/github';
const GitHubIcon = Icon(faGithub);
export default function SomeReactComponent() {
return <div>
<GitHubIcon />
</div>
}