preact-fontawesome
Preact module for Font Awesome 5 icons
This is an unofficial Preact module for Font Awesome 5. It's unofficial in the sense that it's not created or supported by FortAwesome and is a community contribution.
Please see the Official Font Awesome 5 React component library for README details. This package uses repackages react-fontawesome
for Preact compatibility.
Differences from React version
Instead of importing from react
, import from preact
. See examples in original, and modify as appropriate to the following:
import { h } from 'preact';
import { FontAwesomeIcon } from 'preact-fontawesome';
How this is built
This module uses a rollup build process which aliases react
and react-dom
imports to use preact
instead.
Browser support
Using babel-preset-env
for browser support, this targets: '> 1%', 'last 2 versions', 'ie > 10'
.