fa-icon.macro
v1.0.2
Published
> Import SVG files to use as [`@fortawesome/react-fontawesome`](https://www.npmjs.com/package/@fortawesome/react-fontawesome) icons
Downloads
11
Maintainers
Readme
fa-icon.macro
Import SVG files to use as
@fortawesome/react-fontawesome
icons
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>
);
}