import icons from Font Awesome
-
- Posts: 2
- Joined: 09 Nov 2021, 13:46
Hi, I'm trying to import icons from Font Awesome to the menu, but the menu only accepts strings, so I can't import it, someone knows how to do it, thanks
I use Fontawesome with PrimeReact. What does not work?
You should be able to replace anywhere they use PrimeIcons like pi pi-filter fas fa-search for example.
How are you importing FontAwesome?
You should be able to replace anywhere they use PrimeIcons like pi pi-filter fas fa-search for example.
How are you importing FontAwesome?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
Just add fontawesome to your package.json like this...
And in your app class just import it...
Code: Select all
@fortawesome/fontawesome-free": "5.15.4"
Code: Select all
import 'primereact/resources/primereact.min.css';
import 'primeicons/primeicons.css';
import 'primeflex/primeflex.min.css';
import '@fortawesome/fontawesome-free/css/all.min.css';
import './App.scss';
const App = () => {
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 6 guests