@JEricaM wrote:
Stencil version:
@stencil/core@1.3.0
I want to use font awesome inside my Stencil component.
I followed these steps https://fontawesome.com/how-to-use/on-the-web/setup/using-package-managers
1 - Create a “Stencil component starter” project
2 - Install fontawesome
npm install --save-dev @fortawesome/fontawesome-free
3 - I’ve referenced font awesome inside src/index.html
<script src="../node_modules/@fortawesome/fontawesome-free/css/all.css"></script> <script src="../node_modules/@fortawesome/fontawesome-free/js/all.js"></script>
4 - I’ve added the icon inside my component
... render() { return ( <button> <i class="fas fa-camera"></i> </button> ); } ...
5-
<i class="fas fa-camera"></i>
I’m not able to include font awesome inside my stencil component. I’m stuck here.
Posts: 1
Participants: 1