-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove <Fa /> component #67
Comments
This is an example of usage of the v5: It is possible to use a configuration file to keep using string when using an icon:
// `library` is needed for injecting the icon it the fontawesome engine
import { library } from '@fortawesome/fontawesome-svg-core';
// Regular icon
import { faAddressCard } from '@fortawesome/free-regular-svg-icons';
// Basic icon svg
import {
faServer
} from '@fortawesome/free-solid-svg-icons';
// Brand icon svg
import {
faFacebookSquare,
faTwitterSquare,
faLinkedin,
faGithub,
faDocker,
faPython,
faReact,
faCss3Alt,
faHtml5,
faJava,
faJs,
faJsSquare,
} from '@fortawesome/free-brands-svg-icons';
// Initialize icon, this will be allowed anywhere in the app using icon="server",
// or icon={'fab', 'java'} for brand icon
library.add(
faFacebookSquare,
faTwitterSquare,
faLinkedin,
faGithub,
faDocker,
faPython,
faReact,
faCss3Alt,
faHtml5,
faJava,
faJs,
faJsSquare,
); Just import this file in Otherwise, it is possible to pass the import to It can be use with react: import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
<FontAwesomeIcon className="my-4" size="4x" icon={['fab', 'java']} /> note that The This also means fontawesome 5 doesn't need anymore webpack configuration. To install: $ npm install --save \
@fortawesome/fontawesome-svg-core \
@fortawesome/free-brands-svg-icons \
@fortawesome/free-regular-svg-icons \
@fortawesome/free-solid-svg-icons \
@fortawesome/react-fontawesome In case you wonder what is |
/cc @santaclauze can we state where is fontawesome actually used ?
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
v4
Font awesome released a V5 version and this time, they improved the use case for webpack and react.
They now have dedicated components, font, svg, and react component, making our interface obselete.
<FontAwesomeIcon />
source code.This ticket consist of testing the V5 in our project, and replacing V4 to V5.
important
They are some breaking change, read the Upgrade guide for more info.
The text was updated successfully, but these errors were encountered: