Since PrimeIcons has very few options that don't suit my needs, I decided to use FortAwesome in my project.
The problem is, even installing the module, the component Button ignores the icon property referring to the fort awesome icon.
Here is what I tried so far:
In App.tsx, I add the icon to the library component, so I can refer to the icon as a string:
Code: Select all
import {library} from '@fortawesome/fontawesome-svg-core';
import {faCoffee} from '@fortawesome/free-solid-svg-icons';
library.add(faCoffee);
Code: Select all
<Button
onClick={this.pauseButton}
icon="coffee"
/>
If I add the component of FontAwesome alone, the icon is rendered, so I know that my initial installation and setup of the module is correct.
Code: Select all
<FontAwesomeIcon icon="coffee" />
Code: Select all
<Button
onClick={this.pauseButton}
icon="coffee"
>
<FontAwesomeIcon icon="coffee" />
</Button>