1.0.2 • Published 5 years ago

fa-icon.macro v1.0.2

Weekly downloads
10
License
-
Repository
github
Last release
5 years ago

fa-icon.macro

Import SVG files to use as @fortawesome/react-fontawesome icons

CircleCI semantic-release Babel Macro

Installation

npm install --save-dev fa-icon.macro

Usage

import React from 'react';
import createIcon from 'fa-icon.macro';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';

const myIcon = Object.assign(
  createIcon('./logo.svg'),
  {
    iconName: 'my-logo'
  }
);

export default function Example() {
  return (
    <div>
      Here is my logo! <FontAwesomeIcon icon={myIcon} />
    </div>
  );
}