FontAwesome integration with latest release

UI Components for React
Post Reply
elio
Posts: 4
Joined: 21 May 2019, 11:09

19 Jun 2019, 15:53

Hello everyone,
I'm not able to get FowntAwesome (https://github.com/FortAwesome/react-fontawesome) integrated into any of PrimeReact component (like button icon and other).

code example which doesn't work using PR Button component:
<Button icon="fa fa-times">
or with the new default
<Button icon="fas fa-times">

code example which works outside PR components:
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faSearch } from '@fortawesome/free-solid-svg-icons';
<FontAwesomeIcon icon={faSearch} />

Thanks
Elio

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

24 Jun 2019, 09:24

Hi,

I checked it. It works fine for me. Did you add font-awesome css into your project? Please see; https://fontawesome.com/start You can use npm or the other to download css and files.

You can try it without PrimeReact;

Code: Select all

<i className="fa fa-times" />
Best Regards,

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests