@cseitz/icons
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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>
}

Readme

Keywords

none

Package Sidebar

Install

npm i @cseitz/icons

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

10.5 kB

Total Files

5

Last publish

Collaborators

  • cseitz