ReactJs的Glyphicon

ReactJs的Glyphicon,reactjs,react-bootstrap,Reactjs,React Bootstrap,我想在我的React项目中使用Glyphicon。我关注这个网站 供参考。它不起作用。所以我在node_模块中检查了react引导文件,没有Glyphicon 如何导入Glyphicon而不是执行以下操作 两个选项: 引用并复制原始SVG元素: <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-star-fill" fill=&q

我想在我的React项目中使用Glyphicon。我关注这个网站 供参考。它不起作用。所以我在node_模块中检查了react引导文件,没有Glyphicon

如何导入Glyphicon而不是执行以下操作

两个选项:

  • 引用并复制原始SVG元素:
  • 
    
    <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-star-fill" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
      <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.283.95l-3.523 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>
    </svg>
    
    npm install bootstrap-icons
    
    
    <svg class="bi" width="32" height="32" fill="currentColor">
      <use xlink:href="bootstrap-icons.svg#star-fill"/>
    </svg>